Re: Last call comments on WOFF

Jonathan Kew <[email protected]>
Newsgroups gmane.comp.web.fonts
Message-ID <[email protected]>
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.

Jonathan


Tracker, this relates to
ACTION-72: Respond to Bert Bos' Point 5.
Jonathan Kew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.