mirror of
https://github.com/wader/fq.git
synced 2024-11-27 06:04:47 +03:00
051a70bd4b
All other ranges and slicing uses exclusive end so i think it make sense to make it consistent. Update docs and add additional example for non-byte-aligned field. Also fixes issue showing zero bit ranges as start-NA.
32 lines
3.2 KiB
Plaintext
32 lines
3.2 KiB
Plaintext
$ fq -d asn1_ber dv tc37.ber
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: tc37.ber (asn1_ber) 0x0-0xe (14)
|
|
0x000|23 |# | class: "universal" (0) 0x0-0x0.2 (0.2)
|
|
0x000|23 |# | form: "constructed" (1) 0x0.2-0x0.3 (0.1)
|
|
0x000|23 |# | tag: "bit_string" (0x3) 0x0.3-0x1 (0.5)
|
|
0x000| 0c | . | length: 12 0x1-0x2 (1)
|
|
| | | constructed[0:3]: 0x2-0xe (12)
|
|
| | | [0]{}: object 0x2-0x6 (4)
|
|
0x000| 03 | . | class: "universal" (0) 0x2-0x2.2 (0.2)
|
|
0x000| 03 | . | form: "primitive" (0) 0x2.2-0x2.3 (0.1)
|
|
0x000| 03 | . | tag: "bit_string" (0x3) 0x2.3-0x3 (0.5)
|
|
0x000| 02 | . | length: 2 0x3-0x4 (1)
|
|
0x000| 00 | . | unused_bits_count: 0 0x4-0x5 (1)
|
|
0x000| 01 | . | value: raw bits 0x5-0x6 (1)
|
|
| | | [1]{}: object 0x6-0xa (4)
|
|
0x000| 03 | . | class: "universal" (0) 0x6-0x6.2 (0.2)
|
|
0x000| 03 | . | form: "primitive" (0) 0x6.2-0x6.3 (0.1)
|
|
0x000| 03 | . | tag: "bit_string" (0x3) 0x6.3-0x7 (0.5)
|
|
0x000| 02 | . | length: 2 0x7-0x8 (1)
|
|
0x000| 00 | . | unused_bits_count: 0 0x8-0x9 (1)
|
|
0x000| 01 | . | value: raw bits 0x9-0xa (1)
|
|
| | | [2]{}: object 0xa-0xe (4)
|
|
0x000| 03 | . | class: "universal" (0) 0xa-0xa.2 (0.2)
|
|
0x000| 03 | . | form: "primitive" (0) 0xa.2-0xa.3 (0.1)
|
|
0x000| 03 | . | tag: "bit_string" (0x3) 0xa.3-0xb (0.5)
|
|
0x000| 02 | . | length: 2 0xb-0xc (1)
|
|
0x000| 04 | . | unused_bits_count: 4 0xc-0xd (1)
|
|
0x000| 0f| | .| | value: raw bits 0xd-0xd.4 (0.4)
|
|
0x000| 0f| | .| | unused_bits: raw bits 0xd.4-0xe (0.4)
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
|
0x0|01 01 00| |...| | value: raw bits 0x0-0x2.4 (2.4)
|