Commit Graph
122 Commits
Author SHA1 Message Date
Nigel Tao 607bd735b4 Have IntRange methods return distinct *big.Int's 2019-11-01 14:04:23 +11:00
Nigel Tao 70ac26a2c5 Tweak lib/interval/radial_test.go if-else ordering 2019-10-31 16:25:23 +11:00
Nigel Tao 5672e7f0a6 Add IntRange.Unite and IntRange.Intersect 2019-10-31 09:30:20 +11:00
Nigel Tao de807374d2 Have lib/interval use [m ..= n] syntax 2019-10-30 16:43:52 +11:00
Nigel Tao 3cf06d4585 Have cgozstd optionally use zstd 1.4's stable API 2019-10-24 15:32:21 +11:00
Nigel Tao 8ac2af0122 Change raczlib's dictionary wire format
This makes raczlib and raczstd use the same format: RAC's "common
dictionary format".

This is a breaking change to any existing RAC+Zlib files that use shared
dictionaries. RAC+Zlib is still an experimental (unstable) file format.
2019-10-24 10:47:48 +11:00
Nigel Tao 2d8648ae35 Implement raczstd dictionaries 2019-10-23 20:10:07 +11:00
Nigel Tao 7136dcdfd4 Move cgozstd dictionary init earlier, into Reset 2019-10-22 08:29:48 +11:00
Nigel Tao 2fd8649866 Support cgozstd dictionaries
Updates #23
2019-10-22 07:59:30 +11:00
Nigel Tao d501daddc3 Rename [i..j] to [i ..= j], the same as Rust 2019-10-12 18:40:53 +11:00
Nigel Tao 97bcdded0d Remove obsolete TODO 2019-10-05 12:36:37 +10:00
Nigel Tao a9b9a82524 Have concurrent rac reading require an io.ReaderAt 2019-09-28 12:07:26 +10:00
Nigel Tao 59b9dee61a Consistently use tt to name a *testing.T 2019-09-15 22:26:01 +10:00
Nigel Tao 8357a74a8c Fix lib/cgozstd tests with zstd version 1.3 2019-09-15 22:21:43 +10:00
Nigel Tao f98b19f783 Optimize lib/rac's findChunkContaining 2019-09-15 22:15:13 +10:00
Nigel Tao 619eddd179 Add lib/rac test for findChunkContaining 2019-09-15 21:58:18 +10:00
Nigel Tao 84669cd6ac Fix lib/cgolz4 with lz4 version 1.7 2019-09-15 20:15:55 +10:00
Nigel Tao 00b6d22333 Add a lib/raclz4 package 2019-09-15 14:13:45 +10:00
Nigel Tao 01ebdae372 Fix comment typo in racxxx examples 2019-09-15 14:03:34 +10:00
Nigel Tao ecbfe8dbb3 Increase lib/cgozstd buffer size from 4K to 64K 2019-09-15 13:39:43 +10:00
Nigel Tao a108ec9742 Tweak lib/cgozstd errCode style 2019-09-15 13:39:26 +10:00
Nigel Tao 5e957c1161 Add a lib/cgolz4 package 2019-09-15 13:38:40 +10:00
Nigel Tao 8e0b5aab3b Fix cgozstd_test.go comment typo 2019-09-15 13:05:15 +10:00
Nigel Tao cde91019d9 Remove the rac.ReaderContext type 2019-09-15 10:16:59 +10:00
Nigel Tao badbcc2be8 Tweak raczlib to be consistent with raczstd 2019-09-14 12:57:46 +10:00
Nigel Tao 3a3d9a3ca8 Add a lib/raczstd package 2019-09-14 12:57:15 +10:00
Nigel Tao b4191d48a1 Tweak cgozlib to be consistent with cgozstd 2019-09-14 11:41:36 +10:00
Nigel Tao 3adcfc4d99 Add a lib/cgozstd package 2019-09-14 11:41:13 +10:00
Nigel Tao 99197b3f09 Add a lib/compression package 2019-09-14 11:01:08 +10:00
Nigel Tao eac65a0084 Fix lib/raczlib build for CGO_ENABLED=0 2019-09-14 10:26:15 +10:00
Nigel Tao 8d408c7c2c Add a Close method to rac.Codec{Reader,Writer} 2019-09-10 09:19:01 +10:00
Nigel Tao fed2073b00 Have lib/raczlib use lib/cgozlib
As the cmd/ractool comment changes say, this is almost a 2x speed-up for
RAC+Zlib decoding on the enwik8 test file, comparable to the cgozlib
benchmark numbers:

$ go test -test.bench=. github.com/google/wuffs/lib/cgozlib
goos: linux
goarch: amd64
pkg: github.com/google/wuffs/lib/cgozlib
BenchmarkCgo-56     	    2514	    477230 ns/op
BenchmarkPure-56    	    1090	   1080853 ns/op
2019-09-07 11:35:48 +10:00
Nigel Tao 0f89b06207 Rename RAC's Zstandard Short Codec value
The bits in the byte no longer need to be independent. We can enumerate
0, 1, 2, etc instead of 1<<0, 1<<1, 1<<2, etc.
2019-09-07 11:23:52 +10:00
Nigel Tao 84878498ef Replace RAC's Brotli Short Codec value by LZ4
RAC still supports Brotli (as a Long Codec, not a Short Codec). It's
just no longer given a dedicated Short Codec value (and therefore less
likely to be supported out-of-the-box by cmd/ractool). Brotli occupies a
similar position to Zstandard on the speed versus size frontier. LZ4
occupies a noticably different position, faster but larger.
2019-09-07 11:19:10 +10:00
Nigel Tao 4006157f9f Re-do RAC codec values, from 8 bits to 56 bits 2019-09-07 10:25:33 +10:00
Nigel Tao e7c7e7bcf9 Have rac low-level test use a different fake Codec 2019-09-07 08:17:07 +10:00
Nigel Tao 7955ae50d1 Add cgozlib stubs to build when CGO_ENABLED=0 2019-09-07 08:10:16 +10:00
Nigel Tao a93d5a8ea7 Add a lib/cgozlib package 2019-09-01 22:48:56 +10:00
Nigel Tao 1fa39758cf Add a rac.CodecWriter.CanCut method 2019-09-01 15:37:21 +10:00
Nigel Tao 0a31851d85 Tweak how rac.concReader.Read moves to next work 2019-09-01 15:19:09 +10:00
Nigel Tao cb40bbc26c Simplify rac.concReader.nextWork 2019-09-01 15:11:04 +10:00
Nigel Tao c3f45a7aed Limit rac concurrent reader buffer sizes 2019-09-01 15:09:56 +10:00
Nigel Tao b8cd560594 Add a rac.Reader.SeekRange method 2019-08-31 22:19:54 +10:00
Nigel Tao 7753d147b7 Move RAC concurrent decode from program to library 2019-08-31 17:14:28 +10:00
Nigel Tao e0d9749f4e Add a rac.Reader.Close method 2019-08-31 10:43:18 +10:00
Nigel Tao 22c030b2e0 Have ractool decode in parallel
The "middle of the decompressed file" numbers changed because the
programs were re-run on a desktop, not a laptop.
2019-08-24 12:59:49 +10:00
Nigel Tao ca4a6c8846 Restore rac's CompressedSize to avoid Seek calls 2019-08-24 09:34:12 +10:00
Nigel Tao 9394364a47 Have rac favor io.ReaderAt over io.ReadSeeker 2019-08-24 07:56:34 +10:00
Nigel Tao 62211056f8 Fix "if false" debugging left in rac's readAt 2019-08-24 07:04:11 +10:00
Nigel Tao 31bdd08ce6 Re-order rac.Writer fields 2019-08-24 07:02:24 +10:00