W3C home > Mailing lists > Public > public-webfonts-wg@w3.org > February 2011

Re: Last call comments on WOFF

From: Jonathan Kew <jonathan@jfkew.plus.com>
Date: Wed, 9 Feb 2011 14:23:37 +0000
Cc: www-font@w3.org, 3668 FONT <public-webfonts-wg@w3.org>
Message-Id: <39EC9661-5C20-44D7-93A7-7142D2EF30AD@jfkew.plus.com>
To: Bert Bos <bert@w3.org>
On 12 Jan 2011, at 15:16, Bert Bos wrote:

> 5) Section 4 / section 8. I like the rigorous error handling: if the  
> decompressed length is not what was declared as origLength, the file  
> _must_ be rejected. No attempts to second-guess what the encoder  
> "intended" to do.
> On the other hand, it's a bit wasteful to use four bytes to store an  
> origLength. One bit to indicate compression would have been enough.  
> There is no actual need to check the length, because there is already  
> a checksum.

The origLength for each table is stored in the WOFF file as a convenience for UAs (or other tools) that need to decompress the tables: it allows the necessary buffer space to be pre-allocated in a single operation, without needing to interpret the compressed data once just to determine the space needed and then a second time to actually decompress, or to dynamically expand the destination buffer during decompression.

Please let us know if this adequately addresses your comment.


Tracker, this relates to
ACTION-72: Respond to Bert Bos' Point 5.
Jonathan Kew
Received on Wednesday, 9 February 2011 14:25:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:15 UTC