Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: klauspost/compress
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.16.7
Choose a base ref
...
head repository: klauspost/compress
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.17.0
Choose a head ref
  • 13 commits
  • 47 files changed
  • 4 contributors

Commits on Jul 10, 2023

  1. Configuration menu
    Copy the full SHA
    b7fbbd3 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. Update README.md

    klauspost authored Jul 14, 2023
    Configuration menu
    Copy the full SHA
    f71e4d3 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. flate: Add amd64 assembly matchlen (#837)

    * flate: Add assembly matchlen
    
    A few percent faster.
    
    ```
    before:
    github-june-2days-2019.json	gzkp	1	6273951764	1073607045	17271	346.43
    github-june-2days-2019.json	gzkp	2	6273951764	1045461954	20016	298.92
    github-june-2days-2019.json	gzkp	3	6273951764	1030139729	21372	279.95
    github-june-2days-2019.json	gzkp	4	6273951764	992526317	26354	227.03
    github-june-2days-2019.json	gzkp	5	6273951764	938015731	28919	206.89
    github-june-2days-2019.json	gzkp	6	6273951764	918717756	32473	184.25
    github-june-2days-2019.json	gzkp	7	6273951764	924473679	41597	143.84
    github-june-2days-2019.json	gzkp	8	6273951764	905294390	52419	114.14
    github-june-2days-2019.json	gzkp	9	6273951764	895561157	103132	58.02
    
    after:
    github-june-2days-2019.json	gzkp	1	6273951764	1073607045	16978	352.40
    github-june-2days-2019.json	gzkp	2	6273951764	1045461954	19362	309.01
    github-june-2days-2019.json	gzkp	3	6273951764	1030139729	20882	286.53
    github-june-2days-2019.json	gzkp	4	6273951764	992526317	25009	239.24
    github-june-2days-2019.json	gzkp	5	6273951764	938015731	28934	206.79
    github-june-2days-2019.json	gzkp	6	6273951764	918717756	32698	182.98
    github-june-2days-2019.json	gzkp	7	6273951764	924473679	42734	140.01
    github-june-2days-2019.json	gzkp	8	6273951764	905294390	53639	111.55
    github-june-2days-2019.json	gzkp	9	6273951764	895561157	97701	61.24
    ```
    
    * Add noasm fuzz test to deflate
    klauspost authored Jul 17, 2023
    Configuration menu
    Copy the full SHA
    33c9bc8 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Add xerial snappy read/writer (#838)

    Forked from [github.com/eapache/go-xerial-snappy](https://github.com/eapache/go-xerial-snappy).
    
    Changes:
    
    * Uses [S2](https://github.com/klauspost/compress/tree/master/s2#snappy-compatibility) for better/faster compression and decompression.
    * Fixes 0-length roundtrips.
    * Adds `DecodeCapped`, which allows decompression with capped output size.
    * `DecodeInto` will decode directly into destination if there is space enough.
    * `Encode` will now encode directly into 'dst' if it has space enough.
    * Fixes short snappy buffers returning `ErrMalformed`.
    * Renames `EncodeStream` to `Encode`.
    * Adds `EncodeBetter` for better than default compression at ~half the speed.
    
    Comparison (before/after):
    
    ```
    BenchmarkSnappyStreamEncode-32    	  959010	      1170 ns/op	 875.15 MB/s	    1280 B/op	       1 allocs/op
    BenchmarkSnappyStreamEncode-32    	 1000000	      1107 ns/op	 925.04 MB/s	       0 B/op	       0 allocs/op
    --> Output size: 913 -> 856 bytes
    
    BenchmarkSnappyStreamEncodeBetter-32      477739	      2506 ns/op	 408.62 MB/s	       0 B/op	       0 allocs/op
    --> Output size: 835 bytes
    
    BenchmarkSnappyStreamEncodeMassive-32  	     100    	  10596963 ns/op	 966.31 MB/s	   40977 B/op	       1 allocs/op
    BenchmarkSnappyStreamEncodeMassive-32  	     100       	  10220236 ns/op	1001.93 MB/s	       0 B/op	       0 allocs/op
    --> Output size: 2365547 -> 2256991 bytes
    
    BenchmarkSnappyStreamEncodeBetterMassive-32    	      69	  16983314 ns/op	 602.94 MB/s	       0 B/op	       0 allocs/op
    --> Output size: 2011997 bytes
    
    BenchmarkSnappyStreamDecodeInto-32    	 1887378	       639.5 ns/op	1673.19 MB/s	    1088 B/op	       3 allocs/op
    BenchmarkSnappyStreamDecodeInto-32    	 2707915	       436.2 ns/op	2452.99 MB/s	       0 B/op	       0 allocs/op
    
    BenchmarkSnappyStreamDecodeIntoMassive-32    	     267	   4559594 ns/op	2245.81 MB/s	   71120 B/op	       1 allocs/op
    BenchmarkSnappyStreamDecodeIntoMassive-32    	     282	   4285844 ns/op	2389.26 MB/s	       0 B/op	       0 allocs/op
    ```
    klauspost authored Jul 27, 2023
    Configuration menu
    Copy the full SHA
    895291c View commit details
    Browse the repository at this point in the history
  2. s2: Do 2 overlapping match checks (#839)

    Mainly faster on long matches, but has little to no regression on short matches.
    klauspost authored Jul 27, 2023
    Configuration menu
    Copy the full SHA
    c1dcc38 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. flate: Add limited window compression (#843)

    Adds a medium compressor that can operate with limited window size.
    
    Exposed in gzip outside deflate for now.
    
    Example sizes:
    
    ```
    === RUN   TestFileWindow/32
        gzip_test.go:349: size: 82504 bytes
    === RUN   TestFileWindow/64
        gzip_test.go:349: size: 75350 bytes
    === RUN   TestFileWindow/128
        gzip_test.go:349: size: 70668 bytes
    === RUN   TestFileWindow/256
        gzip_test.go:349: size: 69276 bytes
    === RUN   TestFileWindow/512
        gzip_test.go:349: size: 68327 bytes
    === RUN   TestFileWindow/1024
        gzip_test.go:349: size: 67876 bytes
    === RUN   TestFileWindow/2048
        gzip_test.go:349: size: 40900 bytes
    === RUN   TestFileWindow/4096
        gzip_test.go:349: size: 38684 bytes
    === RUN   TestFileWindow/8192
        gzip_test.go:349: size: 36263 bytes
    === RUN   TestFileWindow/16384
        gzip_test.go:349: size: 35434 bytes
    === RUN   TestFileWindow/32768
        gzip_test.go:349: size: 34654 bytes
    --- PASS: TestFileWindow (0.03s)
    ```
    klauspost authored Aug 9, 2023
    Configuration menu
    Copy the full SHA
    b404607 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. tests: Fix OSS fuzzer t.Run (#852)

    ```
      t.Run() is not supported when fuzzing in libFuzzer mode
      testing.(*T).Run
    ```
    klauspost authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    ecf01d0 View commit details
    Browse the repository at this point in the history
  2. tests: Use Go 1.21.x (#851)

    * tests: Use Go 1.21.x
    * Fix vet
    * Upgrade goreleaser & garble
    * Install in pre-hook only.
    * Remove deprecated replacements.
    * Work around garble compiler issue
    klauspost authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    11b5108 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. zstd: Remove offset from bitReader (#854)

    We can reslice instead of maintaining a separate offset. This gets rid of some bounds checks.
    
    Also some other micro-optimizations to bit reading code. Combined results:
    
                                                         │   zstd/old   │              zstd/new               │
                                                         │     B/s      │     B/s       vs base               │
    Decoder_DecoderSmall/kppkn.gtb.zst/buffered-8          427.6Mi ± 0%   428.2Mi ± 0%  +0.13% (p=0.019 n=10)
    Decoder_DecoderSmall/kppkn.gtb.zst/unbuffered-8        511.6Mi ± 3%   516.9Mi ± 3%       ~ (p=0.280 n=10)
    Decoder_DecoderSmall/geo.protodata.zst/buffered-8      1.110Gi ± 0%   1.110Gi ± 0%       ~ (p=0.165 n=10)
    Decoder_DecoderSmall/geo.protodata.zst/unbuffered-8    824.7Mi ± 2%   827.3Mi ± 2%       ~ (p=0.481 n=10)
    Decoder_DecoderSmall/plrabn12.txt.zst/buffered-8       330.4Mi ± 0%   330.3Mi ± 1%       ~ (p=0.645 n=10)
    Decoder_DecoderSmall/plrabn12.txt.zst/unbuffered-8     533.3Mi ± 4%   538.8Mi ± 5%       ~ (p=0.393 n=10)
    Decoder_DecoderSmall/lcet10.txt.zst/buffered-8         395.0Mi ± 0%   394.6Mi ± 0%  -0.10% (p=0.034 n=10)
    Decoder_DecoderSmall/lcet10.txt.zst/unbuffered-8       556.5Mi ± 6%   546.2Mi ± 8%       ~ (p=0.436 n=10)
    Decoder_DecoderSmall/asyoulik.txt.zst/buffered-8       342.2Mi ± 0%   342.2Mi ± 0%       ~ (p=0.956 n=10)
    Decoder_DecoderSmall/asyoulik.txt.zst/unbuffered-8     436.7Mi ± 2%   435.4Mi ± 3%       ~ (p=0.739 n=10)
    Decoder_DecoderSmall/alice29.txt.zst/buffered-8        335.6Mi ± 2%   337.0Mi ± 0%  +0.43% (p=0.000 n=10)
    Decoder_DecoderSmall/alice29.txt.zst/unbuffered-8      552.6Mi ± 3%   550.7Mi ± 4%       ~ (p=1.000 n=10)
    Decoder_DecoderSmall/html_x_4.zst/buffered-8           2.264Gi ± 0%   2.271Gi ± 0%  +0.29% (p=0.035 n=10)
    Decoder_DecoderSmall/html_x_4.zst/unbuffered-8         1.558Gi ± 4%   1.554Gi ± 3%       ~ (p=0.579 n=10)
    Decoder_DecoderSmall/paper-100k.pdf.zst/buffered-8     3.554Gi ± 5%   3.610Gi ± 0%  +1.59% (p=0.000 n=10)
    Decoder_DecoderSmall/paper-100k.pdf.zst/unbuffered-8   1.701Gi ± 8%   1.709Gi ± 5%       ~ (p=0.631 n=10)
    Decoder_DecoderSmall/fireworks.jpeg.zst/buffered-8     7.891Gi ± 4%   8.070Gi ± 0%  +2.26% (p=0.000 n=10)
    Decoder_DecoderSmall/fireworks.jpeg.zst/unbuffered-8   3.062Gi ± 4%   3.129Gi ± 2%  +2.16% (p=0.002 n=10)
    Decoder_DecoderSmall/urls.10K.zst/buffered-8           525.4Mi ± 6%   553.8Mi ± 0%  +5.39% (p=0.000 n=10)
    Decoder_DecoderSmall/urls.10K.zst/unbuffered-8         763.7Mi ± 6%   819.7Mi ± 2%  +7.34% (p=0.000 n=10)
    Decoder_DecoderSmall/html.zst/buffered-8               894.8Mi ± 0%   898.8Mi ± 2%  +0.45% (p=0.043 n=10)
    Decoder_DecoderSmall/html.zst/unbuffered-8             722.3Mi ± 2%   717.7Mi ± 2%       ~ (p=0.912 n=10)
    Decoder_DecoderSmall/comp-data.bin.zst/buffered-8      386.6Mi ± 2%   390.4Mi ± 0%  +1.00% (p=0.000 n=10)
    Decoder_DecoderSmall/comp-data.bin.zst/unbuffered-8    145.2Mi ± 2%   148.7Mi ± 1%  +2.42% (p=0.003 n=10)
    geomean                                                770.3Mi        777.5Mi       +0.93%
    greatroar authored Aug 18, 2023
    Configuration menu
    Copy the full SHA
    0836a1c View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

  1. Update README.md

    klauspost authored Aug 28, 2023
    Configuration menu
    Copy the full SHA
    66f41b3 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2023

  1. Add dictionary builder (#853)

    * Add dictionary builder
    klauspost authored Aug 29, 2023
    Configuration menu
    Copy the full SHA
    11e91a1 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2023

  1. Configuration menu
    Copy the full SHA
    0e8837c View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. gzip: Copy bufio.Reader on Reset (#860)

    The code already checks to see if the buffer can be reused, but since
    it's not copied in the overwrite, a new buffer is allocated each time.
    thatguystone authored Sep 18, 2023
    Configuration menu
    Copy the full SHA
    fd16146 View commit details
    Browse the repository at this point in the history
Loading