Commit Graph

53 Commits

Author SHA1 Message Date
Kenichi Ishibashi 6cef49677d Fix a compile error on Windows 2014-06-06 17:39:02 +09:00
Kenichi Ishibashi c75ed764ef Avoid using data() of std::vector in woff2_dec 2014-06-04 08:29:53 +09:00
Kenichi Ishibashi 142d8881c1 Separate woff2 enc/dec logic 2014-05-30 09:06:32 +09:00
Roderick Sheeter 2ec0cb8a78 Always remove DSIG, removed several options 2014-05-07 11:01:07 -07:00
David Kuettel 47c5016d7f Specification updates: known table tags, reserved flag bits, always preprocess 2014-04-29 17:47:03 -07:00
Zoltan Szabadka 05b3775ecb Fix buffer overflow bug in the brotli encoder. 2014-03-27 16:38:07 +01:00
Zoltan Szabadka 22e2c32828 Implementation of the woff2 format changes proposed by the W3C working group.
* size of compressed font data is in the woff2 header
  * bits 5 and 6 of the table flag byte are reserved, must be 0
  * bit 7 of the table flag byte is the transform bit
2014-03-27 16:13:13 +01:00
Zoltan Szabadka 0829e37293 Update the dictionary and the transforms. 2014-03-25 16:48:25 +01:00
Zoltan Szabadka 494c85cebb Set font mode for the brotli call in the woff2 encoder. 2014-03-20 14:35:41 +01:00
Zoltan Szabadka 278b89484f Updates to Brotli compression format, decoder and encoder
This commit contains a batch of changes that were made to the Brotli
compression algorithm in the last month. Most important changes:

   * Format change: don't push distances representing static dictionary words to the distance cache.
   * Fix decoder invalid memory access bug caused by building a non-complete Huffman tree.
   * Add a mode parameter to the encoder interface.
   * Use different hashers for text and font mode.
   * Add a heuristics to the hasher for skipping non-compressible data.
   * Exhaustive search of static dictionary during backward reference search.
2014-03-20 14:32:35 +01:00
Zoltan Szabadka 7f848593bd Enable the static dictionary in the Brotli decoder. 2014-03-06 17:25:43 +01:00
Zoltan Szabadka 2733d6c0c2 Add the initial version of the static dictionary and transforms to Brotli. 2014-02-17 14:25:36 +01:00
Zoltan Szabadka cbd5cb55f4 Updates to Brotli compression format, decoder and encoder
This commit contains a batch of changes that were made to the Brotli
compression algorithm in the last month. Most important changes:

   * Fixes to the spec.
   * Change of code length code order.
   * Use a 2-level Huffman lookup table in the decoder.
   * Faster uncompressed meta-block decoding.
   * Optimized encoding of the Huffman code.
   * Detection of UTF-8 input encoding.
   * UTF-8 based literal cost modeling for improved
     backward reference selection.
2014-02-14 15:04:23 +01:00
Zoltan Szabadka dfc5a9f215 Fix -Wconversion compiler warnings in the brotli decoder. 2014-01-08 12:34:35 +01:00
Zoltan Szabadka 4c8c7fd31c Brotli format change: small improvement to the encoding of Huffman codes
Combine the HSKIP and the simple/complex Huffman code type bits.
2014-01-08 12:28:28 +01:00
Zoltan Szabadka efbc1a8965 Small update to brotli specification.
Clarify how to recover from error conditions caused by overflowing
block types and symbol values.
2014-01-06 16:35:24 +01:00
Zoltan Szabadka 40955ce409 Bug fixes for the brotli encoder and decoder. 2014-01-06 16:01:57 +01:00
Zoltan Szabadka b89f3be40b Brotli format change: improved encoding of Huffman codes
This change removes the redundant HCLEN, HLENINC and HLEN
fields from the encoding of the complex Huffman codes and
derives these from an invariant of the code length sequence.
Based on a patch by Robert Obryk.
2013-12-17 17:17:57 +01:00
Zoltan Szabadka 30625ba238 Use C-style comments in the brotli decoder. 2013-12-16 14:45:57 +01:00
Zoltan Szabadka 931479d735 Fix Microsoft VisualStudio 64-bit build of brotli 2013-12-13 15:30:20 +01:00
Zoltan Szabadka 19320557a9 Fix Microsoft VisualStudio build of brotli
- Move all variable declarations to the beginning of the block
- #ifdef-out read/write calls
2013-12-13 10:39:46 +01:00
Roderick Sheeter 2e5995bd96 Support for OSX build; tested using OSX 10.9/clang-500.2.79 2013-12-12 10:43:05 -08:00
Zoltan Szabadka e70949119a Updates to Brotli compression format, decoder and encoder
This commit contains a batch of changes that were made to the Brotli
compression algorithm in the last month. Most important changes:

   * Updated spec
   * Changed Huffman code length alphabet to use run length codes more
     efficiently, based on a suggestion by Robert Obryk
   * Changed encoding of the number of Huffman code lengths (HLEN)
   * Changed encoding of the number of Huffman trees (NTREES)
   * Added support for uncompressed meta-blocks
2013-12-12 13:18:04 +01:00
Zoltan Szabadka fe79fac8da Add draft specification of the brotli format 2013-11-28 17:37:13 +01:00
Roderick Sheeter 4147ca2646 Remove old files; use the ones in woff2/ instead 2013-11-20 15:11:17 -08:00
Roderick Sheeter 437bbad370 Added Brotli compress/decompress utilities and makefiles 2013-11-19 14:32:56 -08:00
Zoltan Szabadka 1571db36a9 Updates to Brotli compression format, decoder and encoder
This commit contains a batch of changes that were made to the Brotli
compression algorithm in the last three weeks. Most important changes:

  * Added UTF8 context model for good text compression.
  * Simplified context modeling by having only 4 context modes.
  * Per-block context mode selection.
  * Faster backward copying and bit reading functions.
  * More efficient histogram coding.
  * Streaming support for the decoder and encoder.
2013-11-15 19:02:17 +01:00
Zoltan Szabadka 79e99afe46 Add brotli compressor
This commit is for the encoder for brotli compression format.
Brotli is a generic byte-level compression algorithm.
2013-10-23 13:06:13 +02:00
Zoltan Szabadka b35077ca42 Make the brotli decoder more C90-compatible.
(1) Move all variable declarations to the beginning of the block.
(2) Remove 'z' printf modifiers.
(3) Fix 'comma at the end of enumeration list' warning.
2013-10-22 15:02:54 +02:00
Zoltan Szabadka 9c62eb3e1e Fix name collisions with libwebp.
Prefix all externally visible function names with Brotli and
make all other functions static.
2013-10-17 12:41:36 +02:00
Raph Levien 7efdf8e114 Cleanup of README
Refer to brotli/ subdirectory (explicitly naming the license) and clean
up a few other things in the README text.
2013-10-11 10:33:29 +02:00
Zoltan Szabadka 04163a87d0 Add brotli decompressor
This commit is for the decoder for brotli compression format.
Brotli is a generic byte-level compression algorithm.
2013-10-11 10:26:07 +02:00
David Kuettel 5ce8fad3ab Write the converted and compressed files (.woff2) to disk 2013-06-11 12:52:53 -07:00
David Kuettel 76b55053e7 Compare WOFF 2.0 vs. WOFF 1.0 (instead of GZIP) 2013-05-28 16:22:52 -07:00
David Kuettel c34a8fce98 Add early support for CFF 2013-05-28 15:49:04 -07:00
David Kuettel ade3f14974 Emit a warning message for .otf files, which are not supported yet 2013-04-19 16:24:19 -07:00
David Kuettel 0cffdd1e74 Catch, log and continue upon encountering an exception 2013-04-18 10:34:18 -07:00
David Kuettel c3f8753bee Remove stale references to /usr/bin/lzma, etc 2013-04-12 15:37:36 -07:00
David Kuettel f932d9cbf5 Record the WOFF 2.0 compression improvement (%) in the CSV file 2013-04-11 18:18:50 -07:00
David Kuettel 42726b6c1f Add a simplified runner which outputs a CSV report 2013-04-11 17:40:54 -07:00
David Kuettel 19411b7e95 Cleanup: remove email addresses 2013-04-11 14:49:57 -07:00
David Kuettel b3776ee481 Cleanup: remove build artifacts from git 2013-04-11 13:44:09 -07:00
David Kuettel 6966b2c40d Comment debug output 2013-04-10 18:48:32 -07:00
David Kuettel c0d9d606d2 Ensure LZMA compression is used by default 2013-04-10 18:44:14 -07:00
David Kuettel e617737810 Cleanup: minor style, Javadoc and code changes 2013-04-10 18:25:12 -07:00
David Kuettel a9ce166190 Cleanup: remove unused Command abstractions (cont.) 2013-04-10 15:21:35 -07:00
David Kuettel ac7ebc90da Cleanup: remove unused Command abstractions 2013-04-10 15:16:04 -07:00
Raph Levien bd9d6ce3ae Security fixes to woff2 decompression
This patch addresses the security and other problems found by agl in
his review of a previous version of the code.
2013-04-05 17:01:50 -07:00
David Kuettel 1fec2c0a61 Use SevenZip Java LZMA compression library 2013-02-06 17:46:04 -08:00
David Kuettel 0c3b13964f Compile with debug information 2013-02-06 09:31:23 -08:00