mirror of
https://github.com/wader/fq.git
synced 2024-12-24 13:52:02 +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.
133 lines
13 KiB
Plaintext
133 lines
13 KiB
Plaintext
# convert -size 4x4 "xc:#000" 4x4.png
|
|
# pngcrush -ztxt a akeyword atext 4x4.png 4x4out.png
|
|
# mv 4x4out.png 4x4.png
|
|
$ fq -d png dv 4x4.png
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: 4x4.png (png) 0x0-0x126 (294)
|
|
0x000|89 50 4e 47 0d 0a 1a 0a |.PNG.... | signature: raw bits (valid) 0x0-0x8 (8)
|
|
| | | chunks[0:10]: 0x8-0x126 (286)
|
|
| | | [0]{}: chunk 0x8-0x21 (25)
|
|
0x000| 00 00 00 0d | .... | length: 13 0x8-0xc (4)
|
|
0x000| 49 48 44 52| IHDR| type: "IHDR" 0xc-0x10 (4)
|
|
0x000| 49 | I | ancillary: false 0xc.3-0xc.4 (0.1)
|
|
0x000| 48 | H | private: false 0xd.3-0xd.4 (0.1)
|
|
0x000| 44 | D | reserved: false 0xe.3-0xe.4 (0.1)
|
|
0x000| 52| R| safe_to_copy: true 0xf.3-0xf.4 (0.1)
|
|
0x010|00 00 00 04 |.... | width: 4 0x10-0x14 (4)
|
|
0x010| 00 00 00 04 | .... | height: 4 0x14-0x18 (4)
|
|
0x010| 01 | . | bit_depth: 1 0x18-0x19 (1)
|
|
0x010| 00 | . | color_type: "grayscale" (0) 0x19-0x1a (1)
|
|
0x010| 00 | . | compression_method: "deflate" (0) 0x1a-0x1b (1)
|
|
0x010| 00 | . | filter_method: "adaptive_filtering" (0) 0x1b-0x1c (1)
|
|
0x010| 00 | . | interlace_method: "none" (0) 0x1c-0x1d (1)
|
|
0x010| 81 8a a3| ...| crc: 0x818aa3d3 (valid) 0x1d-0x21 (4)
|
|
0x020|d3 |. |
|
|
| | | [1]{}: chunk 0x21-0x31 (16)
|
|
0x020| 00 00 00 04 | .... | length: 4 0x21-0x25 (4)
|
|
0x020| 67 41 4d 41 | gAMA | type: "gAMA" 0x25-0x29 (4)
|
|
0x020| 67 | g | ancillary: false 0x25.3-0x25.4 (0.1)
|
|
0x020| 41 | A | private: false 0x26.3-0x26.4 (0.1)
|
|
0x020| 4d | M | reserved: false 0x27.3-0x27.4 (0.1)
|
|
0x020| 41 | A | safe_to_copy: false 0x28.3-0x28.4 (0.1)
|
|
0x020| 00 00 b1 8f | .... | value: 45455 0x29-0x2d (4)
|
|
0x020| 0b fc 61| ..a| crc: 0xbfc6105 (valid) 0x2d-0x31 (4)
|
|
0x030|05 |. |
|
|
| | | [2]{}: chunk 0x31-0x5d (44)
|
|
0x030| 00 00 00 20 | ... | length: 32 0x31-0x35 (4)
|
|
0x030| 63 48 52 4d | cHRM | type: "cHRM" 0x35-0x39 (4)
|
|
0x030| 63 | c | ancillary: false 0x35.3-0x35.4 (0.1)
|
|
0x030| 48 | H | private: false 0x36.3-0x36.4 (0.1)
|
|
0x030| 52 | R | reserved: true 0x37.3-0x37.4 (0.1)
|
|
0x030| 4d | M | safe_to_copy: false 0x38.3-0x38.4 (0.1)
|
|
0x030| 00 00 7a 26 | ..z& | white_point_x: 31.27 0x39-0x3d (4)
|
|
0x030| 00 00 80| ...| white_point_y: 32.9 0x3d-0x41 (4)
|
|
0x040|84 |. |
|
|
0x040| 00 00 fa 00 | .... | red_x: 64 0x41-0x45 (4)
|
|
0x040| 00 00 80 e8 | .... | red_y: 33 0x45-0x49 (4)
|
|
0x040| 00 00 75 30 | ..u0 | green_x: 30 0x49-0x4d (4)
|
|
0x040| 00 00 ea| ...| green_y: 60 0x4d-0x51 (4)
|
|
0x050|60 |` |
|
|
0x050| 00 00 3a 98 | ..:. | blue_x: 15 0x51-0x55 (4)
|
|
0x050| 00 00 17 70 | ...p | blue_y: 6 0x55-0x59 (4)
|
|
0x050| 9c ba 51 3c | ..Q< | crc: 0x9cba513c (valid) 0x59-0x5d (4)
|
|
| | | [3]{}: chunk 0x5d-0x6b (14)
|
|
0x050| 00 00 00| ...| length: 2 0x5d-0x61 (4)
|
|
0x060|02 |. |
|
|
0x060| 62 4b 47 44 | bKGD | type: "bKGD" 0x61-0x65 (4)
|
|
0x060| 62 | b | ancillary: false 0x61.3-0x61.4 (0.1)
|
|
0x060| 4b | K | private: false 0x62.3-0x62.4 (0.1)
|
|
0x060| 47 | G | reserved: false 0x63.3-0x63.4 (0.1)
|
|
0x060| 44 | D | safe_to_copy: false 0x64.3-0x64.4 (0.1)
|
|
0x060| 00 01 | .. | gray: 1 0x65-0x67 (2)
|
|
0x060| dd 8a 13 a4 | .... | crc: 0xdd8a13a4 (valid) 0x67-0x6b (4)
|
|
| | | [4]{}: chunk 0x6b-0x7e (19)
|
|
0x060| 00 00 00 07 | .... | length: 7 0x6b-0x6f (4)
|
|
0x060| 74| t| type: "tIME" 0x6f-0x73 (4)
|
|
0x070|49 4d 45 |IME |
|
|
0x060| 74| t| ancillary: true 0x6f.3-0x6f.4 (0.1)
|
|
0x070|49 |I | private: false 0x70.3-0x70.4 (0.1)
|
|
0x070| 4d | M | reserved: false 0x71.3-0x71.4 (0.1)
|
|
0x070| 45 | E | safe_to_copy: false 0x72.3-0x72.4 (0.1)
|
|
0x070| 07 e5 07 1c 08 36 09 | .....6. | data: raw bits 0x73-0x7a (7)
|
|
0x070| dc 61 6c cf | .al. | crc: 0xdc616ccf (valid) 0x7a-0x7e (4)
|
|
| | | [5]{}: chunk 0x7e-0x95 (23)
|
|
0x070| 00 00| ..| length: 11 0x7e-0x82 (4)
|
|
0x080|00 0b |.. |
|
|
0x080| 49 44 41 54 | IDAT | type: "IDAT" 0x82-0x86 (4)
|
|
0x080| 49 | I | ancillary: false 0x82.3-0x82.4 (0.1)
|
|
0x080| 44 | D | private: false 0x83.3-0x83.4 (0.1)
|
|
0x080| 41 | A | reserved: false 0x84.3-0x84.4 (0.1)
|
|
0x080| 54 | T | safe_to_copy: true 0x85.3-0x85.4 (0.1)
|
|
0x080| 08 5b 63 60 80 00 00 00 08 00| .[c`......| data: raw bits 0x86-0x91 (11)
|
|
0x090|01 |. |
|
|
0x090| d3 19 34 be | ..4. | crc: 0xd31934be (valid) 0x91-0x95 (4)
|
|
| | | [6]{}: chunk 0x95-0xc6 (49)
|
|
0x090| 00 00 00 25 | ...% | length: 37 0x95-0x99 (4)
|
|
0x090| 74 45 58 74 | tEXt | type: "tEXt" 0x99-0x9d (4)
|
|
0x090| 74 | t | ancillary: true 0x99.3-0x99.4 (0.1)
|
|
0x090| 45 | E | private: false 0x9a.3-0x9a.4 (0.1)
|
|
0x090| 58 | X | reserved: true 0x9b.3-0x9b.4 (0.1)
|
|
0x090| 74 | t | safe_to_copy: true 0x9c.3-0x9c.4 (0.1)
|
|
0x090| 64 61 74| dat| keyword: "date:create" 0x9d-0xa9 (12)
|
|
0x0a0|65 3a 63 72 65 61 74 65 00 |e:create. |
|
|
0x0a0| 32 30 32 31 2d 30 37| 2021-07| text: "2021-07-28T08:54:09+00:00" 0xa9-0xc2 (25)
|
|
0x0b0|2d 32 38 54 30 38 3a 35 34 3a 30 39 2b 30 30 3a|-28T08:54:09+00:|
|
|
0x0c0|30 30 |00 |
|
|
0x0c0| 41 82 1c 77 | A..w | crc: 0x41821c77 (valid) 0xc2-0xc6 (4)
|
|
| | | [7]{}: chunk 0xc6-0xf7 (49)
|
|
0x0c0| 00 00 00 25 | ...% | length: 37 0xc6-0xca (4)
|
|
0x0c0| 74 45 58 74 | tEXt | type: "tEXt" 0xca-0xce (4)
|
|
0x0c0| 74 | t | ancillary: true 0xca.3-0xca.4 (0.1)
|
|
0x0c0| 45 | E | private: false 0xcb.3-0xcb.4 (0.1)
|
|
0x0c0| 58 | X | reserved: true 0xcc.3-0xcc.4 (0.1)
|
|
0x0c0| 74 | t | safe_to_copy: true 0xcd.3-0xcd.4 (0.1)
|
|
0x0c0| 64 61| da| keyword: "date:modify" 0xce-0xda (12)
|
|
0x0d0|74 65 3a 6d 6f 64 69 66 79 00 |te:modify. |
|
|
0x0d0| 32 30 32 31 2d 30| 2021-0| text: "2021-07-28T08:54:09+00:00" 0xda-0xf3 (25)
|
|
0x0e0|37 2d 32 38 54 30 38 3a 35 34 3a 30 39 2b 30 30|7-28T08:54:09+00|
|
|
0x0f0|3a 30 30 |:00 |
|
|
0x0f0| 30 df a4 cb | 0... | crc: 0x30dfa4cb (valid) 0xf3-0xf7 (4)
|
|
| | | [8]{}: chunk 0xf7-0x11a (35)
|
|
0x0f0| 00 00 00 17 | .... | length: 23 0xf7-0xfb (4)
|
|
0x0f0| 7a 54 58 74 | zTXt | type: "zTXt" 0xfb-0xff (4)
|
|
0x0f0| 7a | z | ancillary: true 0xfb.3-0xfb.4 (0.1)
|
|
0x0f0| 54 | T | private: true 0xfc.3-0xfc.4 (0.1)
|
|
0x0f0| 58 | X | reserved: true 0xfd.3-0xfd.4 (0.1)
|
|
0x0f0| 74 | t | safe_to_copy: true 0xfe.3-0xfe.4 (0.1)
|
|
0x0f0| 61| a| keyword: "akeyword" 0xff-0x108 (9)
|
|
0x100|6b 65 79 77 6f 72 64 00 |keyword. |
|
|
0x100| 00 | . | compression_method: "deflate" (0) 0x108-0x109 (1)
|
|
0x100| 08 99 4b 2c 49 ad 28| ..K,I.(| compressed: raw bits 0x109-0x116 (13)
|
|
0x110|01 00 06 4d 02 27 |...M.' |
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| uncompressed{}: () 0x0-0x5 (5)
|
|
0x0|61 74 65 78 74| |atext| | text: "atext" 0x0-0x5 (5)
|
|
0x110| 4c f5 a2 bc | L... | crc: 0x4cf5a2bc (valid) 0x116-0x11a (4)
|
|
| | | [9]{}: chunk 0x11a-0x126 (12)
|
|
0x110| 00 00 00 00 | .... | length: 0 0x11a-0x11e (4)
|
|
0x110| 49 45| IE| type: "IEND" 0x11e-0x122 (4)
|
|
0x120|4e 44 |ND |
|
|
0x110| 49 | I | ancillary: false 0x11e.3-0x11e.4 (0.1)
|
|
0x110| 45| E| private: false 0x11f.3-0x11f.4 (0.1)
|
|
0x120|4e |N | reserved: false 0x120.3-0x120.4 (0.1)
|
|
0x120| 44 | D | safe_to_copy: false 0x121.3-0x121.4 (0.1)
|
|
0x120| ae 42 60 82| | .B`.| | crc: 0xae426082 (valid) 0x122-0x126 (4)
|