-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding record nil support * update the compat files * align tests * fixup tests * move to v4 upload --------- Co-authored-by: Thomas Jungblut <[email protected]>
- Loading branch information
1 parent
242f332
commit d5fa566
Showing
31 changed files
with
721 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
meta: | ||
id: recordio_v3 | ||
endian: le | ||
imports: | ||
- vlq_base128_le | ||
seq: | ||
- id: file_header | ||
type: file_header | ||
- id: record | ||
type: record | ||
repeat: eos | ||
types: | ||
file_header: | ||
doc: | | ||
recordio header format to figure out the version it was written and whether the records are compressed. | ||
seq: | ||
- id: version | ||
type: u4 | ||
doc: The version of the recordio format used in this file. | ||
- id: compression_type | ||
type: u4 | ||
enum: compression | ||
doc: The compression algorithm used. 0 means no compression, 1 means Snappy, 2 means Gzip. | ||
record: | ||
doc: | | ||
recordio record is an "infinite" stream of magic number separated and length encoded byte arrays. | ||
seq: | ||
- id: magic | ||
contents: [0x91, 0x8D, 0x4C] | ||
- id: record_nil | ||
type: u2 | ||
doc: 1 means the record is nil, 0 otherwise | ||
- id: uncompressed_payload_len | ||
type: vlq_base128_le | ||
- id: compressed_payload_len | ||
type: vlq_base128_le | ||
- id: payload | ||
size: record_size | ||
instances: | ||
record_size: | ||
value: uncompressed_payload_len.value ^ compressed_payload_len.value | ||
doc: The size is either the compressed or uncompressed length. | ||
enums: | ||
compression: | ||
0: none | ||
1: snappy | ||
2: gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.