mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
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.
This commit is contained in:
1 parent
4006157f9f
commit
84878498ef
4 files changed
+17
-15
No files matched your search
+4
-4
@@ -22,10 +22,10 @@ Random access means that it is possible to reconstruct part of the decompressed
|
||||
file, starting at a given offset into the decompressed file, without always
|
||||
having to first decompress all of the preceding data.
|
||||
|
||||
In comparison to some other popular compression formats, all three of the Zlib,
|
||||
Brotli and Zstandard specifications (RFCs 1950, 7932 and 8478) explicitly
|
||||
contain the identical phrase: "the data format defined by this specification
|
||||
does not attempt to allow random access to compressed data".
|
||||
In comparison to some other popular compression formats, all four of the Zlib,
|
||||
Brotli, LZ4 and Zstandard specifications explicitly contain the identical
|
||||
phrase: "the data format defined by this specification does not attempt to
|
||||
allow random access to compressed data".
|
||||
|
||||
See the RAC specification for more details:
|
||||
https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md
|
||||
|
||||
+4
-4
@@ -23,10 +23,10 @@ Random access means that it is possible to reconstruct part of the decompressed
|
||||
file, starting at a given offset into the decompressed file, without always
|
||||
having to first decompress all of the preceding data.
|
||||
|
||||
In comparison to some other popular compression formats, all three of the Zlib,
|
||||
Brotli and Zstandard specifications (RFCs 1950, 7932 and 8478) explicitly
|
||||
contain the identical phrase: "the data format defined by this specification
|
||||
does not attempt to allow random access to compressed data".
|
||||
In comparison to some other popular compression formats, all four of the Zlib,
|
||||
Brotli, LZ4 and Zstandard specifications explicitly contain the identical
|
||||
phrase: "the data format defined by this specification does not attempt to
|
||||
allow random access to compressed data".
|
||||
|
||||
See the RAC specification for more details:
|
||||
https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md
|
||||
|
||||
@@ -7,9 +7,10 @@ Status: Draft (as of September 2019). There is no compatibility guarantee yet.
|
||||
|
||||
RAC is a *compressed* file format that allows *random access* (not just
|
||||
sequential access) to the decompressed contents. In comparison to some other
|
||||
popular compression formats, all three of the
|
||||
popular compression formats, all four of the
|
||||
[Zlib](https://tools.ietf.org/html/rfc1950),
|
||||
[Brotli](https://tools.ietf.org/html/rfc7932) and
|
||||
[Brotli](https://tools.ietf.org/html/rfc7932),
|
||||
[LZ4](https://github.com/lz4/lz4/blob/master/doc/lz4_Frame_format.md) and
|
||||
[Zstandard](https://tools.ietf.org/html/rfc8478) specifications explicitly
|
||||
contain the identical phrase: "the data format defined by this specification
|
||||
does not attempt to allow random access to compressed data".
|
||||
@@ -25,7 +26,8 @@ sharing additional context, such as a LZ77 prefix dictionary). A RAC file also
|
||||
contains a hierarchical index of those chunks.
|
||||
|
||||
RAC is a container format, and while it supports common compression codecs like
|
||||
Zlib, Brotli and Zstandard, it is not tied to any particular compression codec.
|
||||
Zlib, Brotli, LZ4 and Zstandard, it is not tied to any particular compression
|
||||
codec.
|
||||
|
||||
Non-goals for version 1 include:
|
||||
|
||||
@@ -300,7 +302,7 @@ compression algorithm:
|
||||
|
||||
- `0x00` means "RAC + Zeroes".
|
||||
- `0x01` means "RAC + Zlib".
|
||||
- `0x02` means "RAC + Brotli".
|
||||
- `0x02` means "RAC + LZ4".
|
||||
- `0x04` means "RAC + ZStandard".
|
||||
- All other values are reserved.
|
||||
|
||||
@@ -515,7 +517,7 @@ reserved. The empty `Tertiary CRange` is ignored. The `Leaf STag` value is also
|
||||
ignored, other than deriving the `Secondary CRange`.
|
||||
|
||||
|
||||
## RAC + Brotli
|
||||
## RAC + LZ4
|
||||
|
||||
TODO.
|
||||
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ func (c Codec) name() string {
|
||||
case 1:
|
||||
return "Zlib"
|
||||
case 2:
|
||||
return "Brotli"
|
||||
return "LZ4"
|
||||
case 4:
|
||||
return "Zstandard"
|
||||
}
|
||||
@@ -98,7 +98,7 @@ func parentChildCodecsValid(parent Codec, child Codec, parentHasMixBit bool) boo
|
||||
const (
|
||||
CodecZeroes = Codec(0x00 << 56)
|
||||
CodecZlib = Codec(0x01 << 56)
|
||||
CodecBrotli = Codec(0x02 << 56)
|
||||
CodecLZ4 = Codec(0x02 << 56)
|
||||
CodecZstandard = Codec(0x04 << 56)
|
||||
|
||||
codecMixBit = Codec(1 << 62)
|
||||
|
||||
Reference in new issue
Block a user