mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Add "random access" definition to ractool docs
This commit is contained in:
1 parent
874f5a1712
commit
f75a10a230
3 files changed
+27
-4
No files matched your search
+15
-1
@@ -16,7 +16,21 @@
|
|||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
const usageStr = `Usage:
|
const usageStr = `ractool manipulates Random Access Compression (RAC) files.
|
||||||
|
|
||||||
|
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".
|
||||||
|
|
||||||
|
See the RAC specification for more details:
|
||||||
|
https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
ractool [flags] [input_filename]
|
ractool [flags] [input_filename]
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -41,13 +41,13 @@ func main1() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if i := bytes.Index(src, []byte("Usage:\n\n")); i < 0 {
|
if i := bytes.Index(src, []byte("ractool manipulates ")); i < 0 {
|
||||||
return fmt.Errorf(`couldn't find "Usage" sub-string`)
|
return fmt.Errorf(`couldn't find documentation sub-string`)
|
||||||
} else {
|
} else {
|
||||||
src = src[i:]
|
src = src[i:]
|
||||||
}
|
}
|
||||||
if j := bytes.Index(src, []byte("*/")); j < 0 {
|
if j := bytes.Index(src, []byte("*/")); j < 0 {
|
||||||
return fmt.Errorf(`couldn't find "Usage" sub-string`)
|
return fmt.Errorf(`couldn't find documentation sub-string`)
|
||||||
} else {
|
} else {
|
||||||
src = src[:j]
|
src = src[:j]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,15 @@
|
|||||||
/*
|
/*
|
||||||
ractool manipulates Random Access Compression (RAC) files.
|
ractool manipulates Random Access Compression (RAC) files.
|
||||||
|
|
||||||
|
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".
|
||||||
|
|
||||||
See the RAC specification for more details:
|
See the RAC specification for more details:
|
||||||
https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md
|
https://github.com/google/wuffs/blob/master/doc/spec/rac-spec.md
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user