You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: s2/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -901,6 +901,14 @@ for each entry {
901
901
}
902
902
```
903
903
904
+
To decode from any given uncompressed offset `(wantOffset)`:
905
+
906
+
* Iterate entries until `entry[n].UncompressedOffset > wantOffset`.
907
+
* Start decoding from `entry[n-1].CompressedOffset`.
908
+
* Discard `entry[n-1].UncompressedOffset - wantOffset` bytes from the decoded stream.
909
+
910
+
See [using indexes](https://github.com/klauspost/compress/tree/master/s2#using-indexes) for functions that perform the operations with a simpler interface.
911
+
904
912
# Format Extensions
905
913
906
914
* Frame [Stream identifier](https://github.com/google/snappy/blob/master/framing_format.txt#L68) changed from `sNaPpY` to `S2sTwO`.
0 commit comments