Skip to content
Snippets Groups Projects
  1. Nov 01, 2015
    • Scott Vokes's avatar
      Update inaccurate assertion. (Only active when logging.) · 060f120a
      Scott Vokes authored
      The bound can include (1 << window size), since the offset is shifted by
      1. There is no point in encoding a 0-byte window, and increasing the
      size for possible backreferences improves the correction ratio.
      
      Reported by @timothyzillon, @sw17ch, @jibsen.
      060f120a
  2. May 31, 2015
  3. May 13, 2015
  4. May 11, 2015
  5. Jan 14, 2014
  6. Dec 28, 2013
    • Scott Vokes's avatar
      Update non-indexed matching to use an int16_t pos. · 14394d0b
      Scott Vokes authored
      Also, update index type to int16_t.
      14394d0b
    • Scott Vokes's avatar
    • Scott Vokes's avatar
      Improve throughput of encoder. Also, decrease HEATSHRINK_MAX_WINDOW_BITS to 15. · 429d41e4
      Scott Vokes authored
      Eliminate some unnecessary comparisons by making the position in the
      index signed, and treating any negative value as not found, not just
      ((uint16_t)-1). Also, decrease HEATSHRINK_MAX_WINDOW_BITS to 15, so
      index values with the highest bit set can be used as working space
      for index optimization on the fly (some day).
      
      Use 'if length >= 3' instead of 'length > 2' for the break even point,
      sinec it makes the intent clearer, and pull the comparison outside of
      the inner loop.
      
      Increase HEATSHRINK_MIN_LOOKAHEAD_BITS to 2, since -l 1 won't compress.
      Also, eliminate the corresponding MAX #define, since it has to be <= the
      window size anyway.
      
      Use a separate *pt == *pt2 instead of pt[0] == pt2[0] for comparison of the
      leading byte, which should allow for better branch prediction.
      
      Eliminate 'needle_index' in the inner loop -- it's only aliasing 'end'.
      
      Also, add comments about the indexing strategy.
      429d41e4
    • Scott Vokes's avatar
      If calling push_bits w/ 8 bits at beginning of new byte, just copy byte over whole. · 8ba557af
      Scott Vokes authored
      This can save a significant amount of time in push_bits, particularly if -w is 8.
      8ba557af
    • Scott Vokes's avatar
      Only call push_bits if count is > 0. · ebf35e8b
      Scott Vokes authored
      ebf35e8b
    • Scott Vokes's avatar
      (BUG) Improve index construction and eliminate redundant compare. · 5ad06a4d
      Scott Vokes authored
      1. Instead of storing an offset to the previous matching byte in the
         index, store the next matching byte bigram. Since the compression
         doesn't break even unless at least 3 bytes match, any single-byte
         matches in the index should just be skipped.
      
         Since this eliminates these false positives in one pass, it also
         removes work that would otherwise be done during every walk of the
         index's offset chain - possibly several times. This greatly
         reduces the time spent in find_longest_match().
      
         EDIT: This prematurely discards information from the index,
         damaging the overall compression effectiveness. Some of the
         links being skipped are still necessary for other chains, so
         they cannot be eliminated this way. It's still possible dynamic
         programming can be used for this, but the strategy in this
         commit doesn't quite work.
      
      2. Eliminate the test of the first byte, since indexing already
         incorporates this comparison ahead of time.
      5ad06a4d
  7. Dec 21, 2013
  8. Dec 19, 2013
  9. May 13, 2013
  10. May 12, 2013
  11. May 11, 2013
  12. Mar 13, 2013
Loading