mirror of
https://github.com/wader/fq.git
synced 2024-12-23 05:13:30 +03:00
fc0aacb654
Think it makes sense to have them all start with d. Also f is often used as function argument name.
115 lines
9.2 KiB
Plaintext
115 lines
9.2 KiB
Plaintext
# fq -n '[0,1,2,3,4,5,6,7,8,9,127,128,-1,-2,-3,-4,-5,-6,-7,-8,-31,-32,0xffff_ffff,-0xffff_ffff,0x7fff_ffff,-0x7fff_ffff]' | json2msgpack > ints.msgpack
|
|
$ fq -d msgpack dv ints.msgpack
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: ints.msgpack (msgpack) 0x0-0x31.7 (50)
|
|
0x00|dc |. | type: "array16" (0xdc) 0x0-0x0.7 (1)
|
|
0x00| 00 1a | .. | length: 26 0x1-0x2.7 (2)
|
|
| | | elements[0:26]: 0x3-0x31.7 (47)
|
|
| | | [0]{}: element 0x3-0x3.7 (1)
|
|
0x00| 00 | . | type: "positive_fixint" (0x0) 0x3-0x3.7 (1)
|
|
0x00| 00 | . | value: 0 0x3-0x3.7 (1)
|
|
| | | [1]{}: element 0x4-0x4.7 (1)
|
|
0x00| 01 | . | type: "positive_fixint" (0x1) 0x4-0x4.7 (1)
|
|
0x00| 01 | . | value: 1 0x4-0x4.7 (1)
|
|
| | | [2]{}: element 0x5-0x5.7 (1)
|
|
0x00| 02 | . | type: "positive_fixint" (0x2) 0x5-0x5.7 (1)
|
|
0x00| 02 | . | value: 2 0x5-0x5.7 (1)
|
|
| | | [3]{}: element 0x6-0x6.7 (1)
|
|
0x00| 03 | . | type: "positive_fixint" (0x3) 0x6-0x6.7 (1)
|
|
0x00| 03 | . | value: 3 0x6-0x6.7 (1)
|
|
| | | [4]{}: element 0x7-0x7.7 (1)
|
|
0x00| 04 | . | type: "positive_fixint" (0x4) 0x7-0x7.7 (1)
|
|
0x00| 04 | . | value: 4 0x7-0x7.7 (1)
|
|
| | | [5]{}: element 0x8-0x8.7 (1)
|
|
0x00| 05 | . | type: "positive_fixint" (0x5) 0x8-0x8.7 (1)
|
|
0x00| 05 | . | value: 5 0x8-0x8.7 (1)
|
|
| | | [6]{}: element 0x9-0x9.7 (1)
|
|
0x00| 06 | . | type: "positive_fixint" (0x6) 0x9-0x9.7 (1)
|
|
0x00| 06 | . | value: 6 0x9-0x9.7 (1)
|
|
| | | [7]{}: element 0xa-0xa.7 (1)
|
|
0x00| 07 | . | type: "positive_fixint" (0x7) 0xa-0xa.7 (1)
|
|
0x00| 07 | . | value: 7 0xa-0xa.7 (1)
|
|
| | | [8]{}: element 0xb-0xb.7 (1)
|
|
0x00| 08 | . | type: "positive_fixint" (0x8) 0xb-0xb.7 (1)
|
|
0x00| 08 | . | value: 8 0xb-0xb.7 (1)
|
|
| | | [9]{}: element 0xc-0xc.7 (1)
|
|
0x00| 09 | . | type: "positive_fixint" (0x9) 0xc-0xc.7 (1)
|
|
0x00| 09 | . | value: 9 0xc-0xc.7 (1)
|
|
| | | [10]{}: element 0xd-0xd.7 (1)
|
|
0x00| 7f | . | type: "positive_fixint" (0x7f) 0xd-0xd.7 (1)
|
|
0x00| 7f | . | value: 127 0xd-0xd.7 (1)
|
|
| | | [11]{}: element 0xe-0xf.7 (2)
|
|
0x00| cc | . | type: "uint8" (0xcc) 0xe-0xe.7 (1)
|
|
0x00| 80| .| value: 128 0xf-0xf.7 (1)
|
|
| | | [12]{}: element 0x10-0x10.7 (1)
|
|
0x10|ff |. | type: "negative_fixint" (0xff) 0x10-0x10.7 (1)
|
|
0x10|ff |. | value: -1 0x10-0x10.7 (1)
|
|
| | | [13]{}: element 0x11-0x11.7 (1)
|
|
0x10| fe | . | type: "negative_fixint" (0xfe) 0x11-0x11.7 (1)
|
|
0x10| fe | . | value: -2 0x11-0x11.7 (1)
|
|
| | | [14]{}: element 0x12-0x12.7 (1)
|
|
0x10| fd | . | type: "negative_fixint" (0xfd) 0x12-0x12.7 (1)
|
|
0x10| fd | . | value: -3 0x12-0x12.7 (1)
|
|
| | | [15]{}: element 0x13-0x13.7 (1)
|
|
0x10| fc | . | type: "negative_fixint" (0xfc) 0x13-0x13.7 (1)
|
|
0x10| fc | . | value: -4 0x13-0x13.7 (1)
|
|
| | | [16]{}: element 0x14-0x14.7 (1)
|
|
0x10| fb | . | type: "negative_fixint" (0xfb) 0x14-0x14.7 (1)
|
|
0x10| fb | . | value: -5 0x14-0x14.7 (1)
|
|
| | | [17]{}: element 0x15-0x15.7 (1)
|
|
0x10| fa | . | type: "negative_fixint" (0xfa) 0x15-0x15.7 (1)
|
|
0x10| fa | . | value: -6 0x15-0x15.7 (1)
|
|
| | | [18]{}: element 0x16-0x16.7 (1)
|
|
0x10| f9 | . | type: "negative_fixint" (0xf9) 0x16-0x16.7 (1)
|
|
0x10| f9 | . | value: -7 0x16-0x16.7 (1)
|
|
| | | [19]{}: element 0x17-0x17.7 (1)
|
|
0x10| f8 | . | type: "negative_fixint" (0xf8) 0x17-0x17.7 (1)
|
|
0x10| f8 | . | value: -8 0x17-0x17.7 (1)
|
|
| | | [20]{}: element 0x18-0x18.7 (1)
|
|
0x10| e1 | . | type: "negative_fixint" (0xe1) 0x18-0x18.7 (1)
|
|
0x10| e1 | . | value: -31 0x18-0x18.7 (1)
|
|
| | | [21]{}: element 0x19-0x19.7 (1)
|
|
0x10| e0 | . | type: "negative_fixint" (0xe0) 0x19-0x19.7 (1)
|
|
0x10| e0 | . | value: -32 0x19-0x19.7 (1)
|
|
| | | [22]{}: element 0x1a-0x1e.7 (5)
|
|
0x10| ce | . | type: "uint32" (0xce) 0x1a-0x1a.7 (1)
|
|
0x10| ff ff ff ff | .... | value: 4294967295 0x1b-0x1e.7 (4)
|
|
| | | [23]{}: element 0x1f-0x27.7 (9)
|
|
0x10| d3| .| type: "int64" (0xd3) 0x1f-0x1f.7 (1)
|
|
0x20|ff ff ff ff 00 00 00 01 |........ | value: -4294967295 0x20-0x27.7 (8)
|
|
| | | [24]{}: element 0x28-0x2c.7 (5)
|
|
0x20| ce | . | type: "uint32" (0xce) 0x28-0x28.7 (1)
|
|
0x20| 7f ff ff ff | .... | value: 2147483647 0x29-0x2c.7 (4)
|
|
| | | [25]{}: element 0x2d-0x31.7 (5)
|
|
0x20| d2 | . | type: "int32" (0xd2) 0x2d-0x2d.7 (1)
|
|
0x20| 80 00| ..| value: -2147483647 0x2e-0x31.7 (4)
|
|
0x30|00 01| |..| |
|
|
$ fq -d msgpack torepr ints.msgpack
|
|
[
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
127,
|
|
128,
|
|
-1,
|
|
-2,
|
|
-3,
|
|
-4,
|
|
-5,
|
|
-6,
|
|
-7,
|
|
-8,
|
|
-31,
|
|
-32,
|
|
4294967295,
|
|
-4294967295,
|
|
2147483647,
|
|
-2147483647
|
|
]
|