2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d mp3 '.headers[0].magic._bits[8:16] | hd' /test.mp3
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0| 44 | D |.: raw bits 0x1-0x1.7 (1)
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d mp3 '.headers[0].magic._bits | [.[8:16], .[0:8]] | hd' /test.mp3
|
2021-10-05 23:26:05 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|44 49| |DI| |.: raw bits 0x0-0x1.7 (2)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -d mp3 '.headers[0].magic._bits | [.[8:16], .[0:8]] | tobits | hd' /test.mp3
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|44 49| |DI| |.: raw bits 0x0-0x1.7 (2)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -d mp3 '.headers[0].magic._bits | [.[8:16], .[0:8]] | tobytes | hd' /test.mp3
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|44 49| |DI| |.: raw bits 0x0-0x1.7 (2)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -n '"12" | tobytes | hd'
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|31 32| |12| |.: raw bits 0x0-0x1.7 (2)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -n '"12" | tobits | hd'
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|31 32| |12| |.: raw bits 0x0-0x1.7 (2)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -n '["12", "3"] | tobytes | hd'
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|31 32 33| |123| |.: raw bits 0x0-0x2.7 (3)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -n '["12", "3"] | tobits | hd'
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|31 32 33| |123| |.: raw bits 0x0-0x2.7 (3)
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -n '[("11" | hex), ("22" | hex)] | tobits | hd'
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|11 22| |."| |.: raw bits 0x0-0x1.7 (2)
|
2020-06-08 03:29:51 +03:00
|
|
|
# TODO: bug, hexdump uses io.Copy which is byte oritneted
|
2021-08-28 16:22:21 +03:00
|
|
|
$ fq -n '[("12" | hex | .bits[4:]), ("34" | hex | .bits[0:4])] | tobits | hd'
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2022-01-24 23:21:48 +03:00
|
|
|
0x0|23| |#| |.: raw bits 0x0-0x0.7 (1)
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d mp3 '.frames[]._bits[0:12] | tonumber' /test.mp3
|
2020-06-08 03:29:51 +03:00
|
|
|
4095
|
|
|
|
4095
|
|
|
|
4095
|
2021-08-13 17:40:28 +03:00
|
|
|
$ fq -d mp3 '.headers[0].magic._bits[0:24] | tostring' /test.mp3
|
2020-06-08 03:29:51 +03:00
|
|
|
"ID3"
|
2021-09-22 01:32:57 +03:00
|
|
|
$ fq -d mp3 '.frames[0].padding | ("", "md5", "base64", "snippet") as $f | tovalue({bits_format: $f})' /test.mp3
|
2021-08-12 02:35:40 +03:00
|
|
|
"<5>AAAAAAA="
|
|
|
|
"ca9c491ac66b2c62500882e93f3719a8"
|
|
|
|
"AAAAAAA="
|
|
|
|
"<5>AAAAAAA="
|
2021-10-17 02:26:30 +03:00
|
|
|
$ fq -d mp3 -i . /test.mp3
|
|
|
|
mp3> [1, 2, 3] | tobytes
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|01 02 03| |...| |.: raw bits 0x0-0x2.7 (3)
|
2021-10-17 02:26:30 +03:00
|
|
|
mp3> [1, 2, 3, [1, 2, 3]] | tobytes
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|01 02 03 01 02 03| |......| |.: raw bits 0x0-0x5.7 (6)
|
2021-10-17 02:26:30 +03:00
|
|
|
mp3> [1, 2, 3, [1, 2, 3], .headers[0].magic] | tobytes
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|01 02 03 01 02 03 49 44 33| |......ID3| |.: raw bits 0x0-0x8.7 (9)
|
2021-10-17 02:26:30 +03:00
|
|
|
mp3> [-1] | tobytes
|
2022-02-08 20:44:48 +03:00
|
|
|
error: byte in binary list must be bytes (0-255) got -1
|
2021-10-17 02:26:30 +03:00
|
|
|
mp3> [256] | tobytes
|
2022-02-08 20:44:48 +03:00
|
|
|
error: byte in binary list must be bytes (0-255) got 256
|
2021-10-17 02:26:30 +03:00
|
|
|
mp3> ^D
|
2021-10-15 19:19:59 +03:00
|
|
|
$ fq -d mp3 -i . /test.mp3
|
|
|
|
mp3> .frames[1] | tobits | ., .start, .stop, .size, .[4:17], (tobits, tobytes, tobitsrange, tobytesrange | ., .start, .stop, .size, .[4:17])
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
mp3> .frames[1] | tobytes | ., .start, .stop, .size, .[4:17], (tobits, tobytes, tobitsrange, tobytesrange | ., .start, .stop, .size, .[4:17])
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
mp3> .frames[1] | tobitsrange | ., .start, .stop, .size, .[4:17], (tobits, tobytes, tobitsrange, tobytesrange | ., .start, .stop, .size, .[4:17])
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0e0| ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80| ..P....,C.U..|.: raw bits 0xe3-0x1b2.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x0f0|01 80 93 6b 27 30 80 00 07 aa c3 8e 33 85 d3 64|...k'0......3..d|
|
|
|
|
* |until 0x1b2.7 (208) | |
|
|
|
|
1816
|
|
|
|
3480
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0xe0| ff fb 50 | ..P |.: raw bits 0xe3.4-0xe5 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0e0| ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80| ..P....,C.U..|.: raw bits 0xe3-0x1b2.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x0f0|01 80 93 6b 27 30 80 00 07 aa c3 8e 33 85 d3 64|...k'0......3..d|
|
|
|
|
* |until 0x1b2.7 (208) | |
|
|
|
|
1816
|
|
|
|
3480
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0xe0| ff fb 50 | ..P |.: raw bits 0xe3.4-0xe5 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0e0| ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80| ..P....,C.U..|.: raw bits 0xe3-0x1b2.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x0f0|01 80 93 6b 27 30 80 00 07 aa c3 8e 33 85 d3 64|...k'0......3..d|
|
|
|
|
* |until 0x1b2.7 (208) | |
|
|
|
|
227
|
|
|
|
435
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0xe0| 00 00 0a 2c 43 2e 55 94 80| ...,C.U..|.: raw bits 0xe7-0xf3.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0xf0|01 80 93 6b |...k |
|
|
|
|
mp3> .frames[1] | tobytesrange | ., .start, .stop, .size, .[4:17], (tobits, tobytes, tobitsrange, tobytesrange | ., .start, .stop, .size, .[4:17])
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0e0| ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80| ..P....,C.U..|.: raw bits 0xe3-0x1b2.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x0f0|01 80 93 6b 27 30 80 00 07 aa c3 8e 33 85 d3 64|...k'0......3..d|
|
|
|
|
* |until 0x1b2.7 (208) | |
|
|
|
|
227
|
|
|
|
435
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0xe0| 00 00 0a 2c 43 2e 55 94 80| ...,C.U..|.: raw bits 0xe7-0xf3.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0xf0|01 80 93 6b |...k |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
1664
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0|ff fb 50 |..P |.: raw bits 0x0.4-0x2 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80 01 80 93|..P....,C.U.....|.: raw bits 0x0-0xcf.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
* |until 0xcf.7 (end) (208) | |
|
|
|
|
0
|
|
|
|
208
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00| 00 00 0a 2c 43 2e 55 94 80 01 80 93| ...,C.U.....|.: raw bits 0x4-0x10.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x10|6b |k |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0e0| ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80| ..P....,C.U..|.: raw bits 0xe3-0x1b2.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x0f0|01 80 93 6b 27 30 80 00 07 aa c3 8e 33 85 d3 64|...k'0......3..d|
|
|
|
|
* |until 0x1b2.7 (208) | |
|
|
|
|
1816
|
|
|
|
3480
|
|
|
|
1664
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0xe0| ff fb 50 | ..P |.: raw bits 0xe3.4-0xe5 (1.5)
|
2021-10-15 19:19:59 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x0e0| ff fb 50 c4 00 00 0a 2c 43 2e 55 94 80| ..P....,C.U..|.: raw bits 0xe3-0x1b2.7 (208)
|
2021-10-15 19:19:59 +03:00
|
|
|
0x0f0|01 80 93 6b 27 30 80 00 07 aa c3 8e 33 85 d3 64|...k'0......3..d|
|
|
|
|
* |until 0x1b2.7 (208) | |
|
|
|
|
227
|
|
|
|
435
|
|
|
|
208
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0xe0| 00 00 0a 2c 43 2e 55 94 80| ...,C.U..|.: raw bits 0xe7-0xf3.7 (13)
|
2021-10-15 19:19:59 +03:00
|
|
|
0xf0|01 80 93 6b |...k |
|
2022-01-24 23:21:48 +03:00
|
|
|
mp3> "fq" | tobits | [.[range(.size)]] | map(tobits) | tobytes | tostring
|
|
|
|
"fq"
|
|
|
|
mp3> "fq" | tobits | chunk(range(17)+1) | tobytes | tostring
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
|
|
|
"fq"
|
2022-02-08 20:44:48 +03:00
|
|
|
mp3> 1 | tobits(range(10)) | hex
|
|
|
|
"80"
|
|
|
|
"80"
|
|
|
|
"40"
|
|
|
|
"20"
|
|
|
|
"10"
|
|
|
|
"08"
|
|
|
|
"04"
|
|
|
|
"02"
|
|
|
|
"01"
|
|
|
|
"0080"
|
|
|
|
mp3> 1 | tobytes(range(5)) | hex
|
|
|
|
"01"
|
|
|
|
"01"
|
|
|
|
"0001"
|
|
|
|
"000001"
|
|
|
|
"00000001"
|
|
|
|
mp3> range(17) | [range(.) | 1 | tobits] | tobits | hex
|
|
|
|
""
|
|
|
|
"80"
|
|
|
|
"c0"
|
|
|
|
"e0"
|
|
|
|
"f0"
|
|
|
|
"f8"
|
|
|
|
"fc"
|
|
|
|
"fe"
|
|
|
|
"ff"
|
|
|
|
"ff80"
|
|
|
|
"ffc0"
|
|
|
|
"ffe0"
|
|
|
|
"fff0"
|
|
|
|
"fff8"
|
|
|
|
"fffc"
|
|
|
|
"fffe"
|
|
|
|
"ffff"
|
|
|
|
mp3> range(17) | [range(.) | 1 | tobits] | tobytes | hex
|
|
|
|
""
|
|
|
|
"01"
|
|
|
|
"03"
|
|
|
|
"07"
|
|
|
|
"0f"
|
|
|
|
"1f"
|
|
|
|
"3f"
|
|
|
|
"7f"
|
|
|
|
"ff"
|
|
|
|
"01ff"
|
|
|
|
"03ff"
|
|
|
|
"07ff"
|
|
|
|
"0fff"
|
|
|
|
"1fff"
|
|
|
|
"3fff"
|
|
|
|
"7fff"
|
|
|
|
"ffff"
|
2022-01-24 23:21:48 +03:00
|
|
|
mp3> "c9dfdac2f6ef68e5db666b6fbeee66d9c7deda66bebfbfe860bfbfbfe9d1636bbfbebf" | hex | tobits | reduce chunk(8)[] as $c ({h:[],g:[]}; .h += [(0|tobits), $c[0:7]] | .g |= . + [if length % 8 == 0 then (0|tobits) else empty end, $c[7:8]]) | .h, .g | tobytes
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
|
|
|
0x00|64 6f 6d 61 7b 77 34 72 6d 33 35 37 5f 77 33 6c|doma{w4rm357_w3l|.: raw bits 0x0-0x22.7 (35)
|
|
|
|
* |until 0x22.7 (end) (35) | |
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
|
|
|
0x0|62 6c 30 67 7d| |bl0g}| |.: raw bits 0x0-0x4.7 (5)
|
|
|
|
mp3> .frames[1] | tobytes | mp3_frame | ., ((.header.bitrate | tobitsrange) as $v | tobitsrange | [.[:$v.start], (0xf | tobits), .[$v.start+$v.size:]] | mp3_frame) | .header.bitrate
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
|
|
|
0x0| 50 | P |.header.bitrate: 64000 (5)
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
|
|
|
0x0| f0 | . |.header.bitrate: 15 (bad)
|
2021-10-15 19:19:59 +03:00
|
|
|
mp3> ^D
|