Skip to content

Commit 152d21f

Browse files
committed
add specification for bzip3
1 parent 17629c7 commit 152d21f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

archive/bzip3.ksy

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
meta:
2+
id: bzip3
3+
title: Bzip3 header
4+
file-extension: bz3
5+
license: LGPL-3.0
6+
encoding: UTF-8
7+
endian: le
8+
doc-ref: https://github.com/kspalaiologos/bzip3
9+
seq:
10+
- id: header
11+
type: header
12+
- id: blocks
13+
type: compressed_data_block
14+
repeat: until
15+
repeat-until: _io.eof or _.is_last
16+
types:
17+
header:
18+
seq:
19+
- id: signature
20+
contents: 'BZ3v1'
21+
- id: block_size
22+
type: u4
23+
compressed_data_block:
24+
seq:
25+
- id: len_compressed
26+
type: u4
27+
- id: len_uncompressed
28+
type: u4
29+
valid:
30+
max: _root.header.block_size
31+
- id: data
32+
size: len_compressed
33+
instances:
34+
is_last:
35+
value: len_uncompressed < _root.header.block_size

0 commit comments

Comments
 (0)