1
1
mirror of https://github.com/wader/fq.git synced 2024-08-18 00:10:29 +03:00

Compare commits

...

140 Commits

Author SHA1 Message Date
Mattias Wadman
e2c8986f73
Merge f8f4473afd into 943743dbaf 2024-05-21 15:46:50 +02:00
Mattias Wadman
943743dbaf
Merge pull request #949 from wader/bump-make-golangci-lint-1.58.2
Update make-golangci-lint to 1.58.2 from 1.58.1
2024-05-20 22:16:07 +02:00
Mattias Wadman
1b85ae622b
Merge pull request #950 from wader/bump-github-golangci-lint-1.58.2
Update github-golangci-lint to 1.58.2 from 1.58.1
2024-05-20 22:16:01 +02:00
bump
f6d7235449 Update github-golangci-lint to 1.58.2 from 1.58.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.58.2
2024-05-20 16:04:14 +00:00
bump
aef47df26a Update make-golangci-lint to 1.58.2 from 1.58.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.58.2
2024-05-20 16:04:10 +00:00
Mattias Wadman
1ec9748046
Merge pull request #947 from wader/bump-make-golangci-lint-1.58.1
Update make-golangci-lint to 1.58.1 from 1.58.0
2024-05-09 18:12:49 +02:00
Mattias Wadman
2e5514fc50
Merge pull request #948 from wader/bump-github-golangci-lint-1.58.1
Update github-golangci-lint to 1.58.1 from 1.58.0
2024-05-09 18:12:44 +02:00
bump
a59ba2a2fa Update github-golangci-lint to 1.58.1 from 1.58.0
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.58.1
2024-05-09 16:03:55 +00:00
bump
7714fcf423 Update make-golangci-lint to 1.58.1 from 1.58.0
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.58.1
2024-05-09 16:03:52 +00:00
Mattias Wadman
544cf4cc09
Merge pull request #945 from wader/bump-docker-golang-1.22.3
Update docker-golang to 1.22.3 from 1.22.2
2024-05-09 00:01:16 +02:00
Mattias Wadman
25ad5f1c8f
Merge pull request #946 from wader/bump-github-go-version-1.22.3
Update github-go-version to 1.22.3 from 1.22.2
2024-05-09 00:00:41 +02:00
bump
9ff7da12a7 Update github-go-version to 1.22.3 from 1.22.2 2024-05-08 16:03:46 +00:00
bump
94cfbc670c Update docker-golang to 1.22.3 from 1.22.2 2024-05-08 16:03:44 +00:00
Mattias Wadman
163b3b609c
Merge pull request #944 from wader/bump-gomod-golang-x-net-0.25.0
Update gomod-golang-x-net to 0.25.0 from 0.24.0
2024-05-07 18:31:45 +02:00
bump
cabb67e8ab Update gomod-golang-x-net to 0.25.0 from 0.24.0
Tags https://github.com/golang/net/tags
2024-05-07 16:03:50 +00:00
Mattias Wadman
64df8bdbf5
Merge pull request #943 from wader/bump-gomod-golang-x-crypto-0.23.0
Update gomod-golang-x-crypto to 0.23.0 from 0.22.0
2024-05-06 19:16:07 +02:00
Mattias Wadman
481ac91880
Merge pull request #942 from wader/bump-gomod-ergochat-readline-0.1.1
Update gomod-ergochat-readline to 0.1.1 from 0.1.0
2024-05-06 19:15:51 +02:00
bump
14ada50806 Update gomod-golang-x-crypto to 0.23.0 from 0.22.0
Tags https://github.com/golang/crypto/tags
2024-05-06 16:04:45 +00:00
bump
12f332064c Update gomod-ergochat-readline to 0.1.1 from 0.1.0
Release notes https://github.com/ergochat/readline/releases/tag/v0.1.1
2024-05-06 16:04:43 +00:00
Mattias Wadman
0ff3e53c5f
Merge pull request #941 from wader/bump-gomod-golang-x-term-0.20.0
Update gomod-golang-x-term to 0.20.0 from 0.19.0
2024-05-05 18:16:15 +02:00
bump
586cf142e5 Update gomod-golang-x-term to 0.20.0 from 0.19.0
Tags https://github.com/golang/term/tags
2024-05-05 16:03:41 +00:00
Mattias Wadman
fb20db5eb7
Merge pull request #937 from wader/bump-make-golangci-lint-1.58.0
Update make-golangci-lint to 1.58.0 from 1.57.2
2024-05-04 18:15:24 +02:00
Mattias Wadman
48868bd4ee
Merge pull request #939 from wader/bump-github-golangci-lint-1.58.0
Update github-golangci-lint to 1.58.0 from 1.57.2
2024-05-04 18:12:55 +02:00
Mattias Wadman
c5c8b75c56
Merge pull request #938 from wader/bump-gomod-golang/text-0.15.0
Update gomod-golang/text to 0.15.0 from 0.14.0
2024-05-04 18:12:01 +02:00
bump
a5de74cd23 Update github-golangci-lint to 1.58.0 from 1.57.2
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.58.0
2024-05-04 16:03:51 +00:00
bump
42730d7586 Update gomod-golang/text to 0.15.0 from 0.14.0
Source diff 0.14.0..0.15.0 https://github.com/golang/text/compare/v0.14.0..v0.15.0
2024-05-04 16:03:49 +00:00
bump
3a683b64f8 Update make-golangci-lint to 1.58.0 from 1.57.2
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.58.0
2024-05-04 16:03:46 +00:00
Mattias Wadman
496849daa5
Merge pull request #936 from wader/update-docs
doc: Cleanup and improve texts a bit
2024-04-30 14:25:36 +02:00
Mattias Wadman
ebf063d1c0 doc: Cleanup and improve texts a bit 2024-04-30 14:16:13 +02:00
Mattias Wadman
b8eec4078f
Merge pull request #934 from matmat/dht-patch
jpeg: Add parsing of DHT parameters
2024-04-25 13:29:44 +02:00
Mattias Iko Mattsson
6e13b4b550 jpeg: Add parsing of DHT parameters 2024-04-25 13:17:08 +02:00
Mattias Wadman
9eee65072f
Merge pull request #935 from wader/ignore-so-dotdotdot-works
build,test: Ignore some files to make ./... work
2024-04-21 11:30:37 +02:00
Mattias Wadman
6db6a54d13 build,test: Ignore some files to make ./... work 2024-04-21 09:50:02 +02:00
Mattias Wadman
08ced4515f
Merge pull request #933 from wader/native-trim
fq: Use trim from gojq
2024-04-19 18:23:15 +02:00
Mattias Wadman
6059b9ee1b fq: Use trim from gojq 2024-04-19 18:09:00 +02:00
Mattias Wadman
f746dab7b2
Merge pull request #932 from wader/jpeg-fix-weird-eoi-desc
jpeg: Fix EOI description
2024-04-19 15:34:52 +02:00
Mattias Wadman
b482556025 jpeg: Fix EOI description 2024-04-19 15:26:10 +02:00
Mattias Wadman
4674060dfe
Merge pull request #931 from wader/goreleaser-update
goreleaser: Update action and fix deprecation warning
2024-04-16 11:44:57 +02:00
Mattias Wadman
ad2c032c7e goreleaser: Update action and fix deprecation warning 2024-04-16 11:12:36 +02:00
Mattias Wadman
d30755b06e
Merge pull request #930 from wader/release-0.11.0
fq: Release 0.11.0
2024-04-14 12:51:38 +02:00
Mattias Wadman
2b12258eba jq: Release 0.11.0 2024-04-14 12:41:42 +02:00
Mattias Wadman
efa847faf1
Merge pull request #929 from wader/decode-iopanic-cleanup
decode: Cleanup io panic a bit
2024-04-12 17:33:48 +02:00
Mattias Wadman
ee2ee24dbb decode: Cleanup io panic a bit 2024-04-12 17:23:03 +02:00
Mattias Wadman
d04a846f10
Merge pull request #928 from wader/jp2c-faster-probe
jp2c: Fail probe faster
2024-04-11 00:13:37 +02:00
Mattias Wadman
79992b341a jp2c: Fail probe faster 2024-04-10 23:54:22 +02:00
Mattias Wadman
ff718d8071
Merge pull request #927 from wader/mp4-decode-uinf
mp4: Decode uinf box
2024-04-10 22:31:42 +02:00
Mattias Wadman
70b1b0d6a3 mp4: Decode uinf box 2024-04-10 22:17:39 +02:00
Mattias Wadman
a3f5e29d8f
Merge pull request #926 from wader/mp4-jp-box
mp4: Decode jP box
2024-04-10 21:59:57 +02:00
Mattias Wadman
f6609ccb0f
Merge pull request #925 from wader/jp2c-probe
jp2c: Support probe
2024-04-10 21:57:27 +02:00
Mattias Wadman
4f90a2eaae mp4: Decode jP box 2024-04-10 21:50:55 +02:00
Mattias Wadman
63f7d79c32 jp2c: Support probe 2024-04-10 21:44:14 +02:00
Mattias Wadman
240ae7f57d
Merge pull request #924 from wader/jpeg2000
jp2c: Add jpeg2000 codestream format
2024-04-10 16:32:59 +02:00
Mattias Wadman
ebffb3be7b jp2c: Add jpeg2000 codestream format 2024-04-10 16:24:14 +02:00
Mattias Wadman
ad33225f20
Merge pull request #923 from loselarry/master
chore: fix function name in comment
2024-04-10 10:36:49 +02:00
loselarry
208b3e6bf2 chore: fix function name in comment
Signed-off-by: loselarry <bikangning@yeah.net>
2024-04-10 16:16:51 +08:00
Mattias Wadman
837de9f658
Merge pull request #922 from wader/mp4-fix-jp2-test
mp4: Fix jp2 test
2024-04-09 23:12:39 +02:00
Mattias Wadman
87b6c4dd6a mp4: Fix jp2 test 2024-04-09 22:59:47 +02:00
Mattias Wadman
5cbda8fbb0
Merge pull request #921 from wader/mp4-jp2-boxes
mp4: JPEG200 boxes jp2h and ihdr
2024-04-09 20:43:26 +02:00
Mattias Wadman
8d31040fd2
Merge pull request #920 from wader/mov-avi-trim-space
mp4,avi: Trim spaces for type
2024-04-09 20:38:19 +02:00
Mattias Wadman
8009b6f661 mp4: JPEG200 boxes jp2h and ihdr 2024-04-09 20:34:53 +02:00
Mattias Wadman
1784c43824 mp4,avi: Trim spaces for type 2024-04-09 20:09:12 +02:00
Mattias Wadman
2f858b1c90
Merge pull request #919 from wader/preview-refactor-array_truncate
interp: Add string_truncate option
2024-04-08 17:55:15 +02:00
Mattias Wadman
c8f9cdc9d7 interp: Add string_truncate option
Was hardcoded to 50, now confiugurable also used affected by dd, dv etc
2024-04-08 17:45:10 +02:00
Mattias Wadman
b6ac25cb39
Merge pull request #917 from wader/bump-gomod-golang-x-net-0.24.0
Update gomod-golang-x-net to 0.24.0 from 0.23.0
2024-04-05 19:44:55 +02:00
bump
daba6b5497 Update gomod-golang-x-net to 0.24.0 from 0.23.0
Tags https://github.com/golang/net/tags
2024-04-05 19:29:41 +02:00
Mattias Wadman
1d6e6f590d
Merge pull request #918 from wader/bump-gomod-golang-x-term-0.19.0
Update gomod-golang-x-term to 0.19.0 from 0.18.0
2024-04-05 19:28:34 +02:00
Mattias Wadman
b45d7d621c
Merge pull request #916 from wader/bump-gomod-golang-x-crypto-0.22.0
Update gomod-golang-x-crypto to 0.22.0 from 0.21.0
2024-04-05 19:28:28 +02:00
bump
b2aa59f759 Update gomod-golang-x-term to 0.19.0 from 0.18.0
Tags https://github.com/golang/term/tags
2024-04-05 16:04:18 +00:00
bump
15a7060bff Update gomod-golang-x-crypto to 0.22.0 from 0.21.0
Tags https://github.com/golang/crypto/tags
2024-04-05 16:04:14 +00:00
Mattias Wadman
c2f0189371
Merge pull request #913 from wader/bump-docker-golang-1.22.2
Update docker-golang to 1.22.2 from 1.22.1
2024-04-04 18:15:49 +02:00
Mattias Wadman
2476330deb
Merge pull request #915 from wader/bump-github-go-version-1.22.2
Update github-go-version to 1.22.2 from 1.22.1
2024-04-04 18:15:40 +02:00
Mattias Wadman
a0a5460cf6
Merge pull request #914 from wader/bump-gomod-golang-x-net-0.23.0
Update gomod-golang-x-net to 0.23.0 from 0.22.0
2024-04-04 18:14:46 +02:00
bump
33c93918ba Update github-go-version to 1.22.2 from 1.22.1 2024-04-04 16:03:55 +00:00
bump
77c000e6e9 Update gomod-golang-x-net to 0.23.0 from 0.22.0
Tags https://github.com/golang/net/tags
2024-04-04 16:03:54 +00:00
bump
0afb5b592e Update docker-golang to 1.22.2 from 1.22.1 2024-04-04 16:03:50 +00:00
Mattias Wadman
93eb6e83ef
Merge pull request #912 from wader/icc-profile-nicer-strings
icc_profile: Strip whitespace in header and tag strings
2024-04-03 10:17:53 +02:00
Mattias Wadman
ed6851163f icc_profile: Strip whitespace in header and tag strings 2024-04-03 10:09:31 +02:00
Mattias Wadman
b67ce0268c
Merge pull request #911 from wader/gomod-update
mod: go get non-bump tracked modules
2024-04-01 19:26:42 +02:00
Mattias Wadman
c5e84236df
Merge pull request #910 from wader/go-1.20-cleanup
fq: Use go 1.20 and cleanup
2024-04-01 19:26:33 +02:00
Mattias Wadman
bf7fa07c41 fq: Use go 1.20 and cleanup
Also rename *ex packages to *x
2024-04-01 19:14:10 +02:00
Mattias Wadman
c6165c0caf mod: go get non-bump tracked modules 2024-04-01 18:54:32 +02:00
Mattias Wadman
48351028c5
Merge pull request #909 from wader/lint-more-and-fixes
lint: More linters and some fixes
2024-04-01 18:32:41 +02:00
Mattias Wadman
4ac96a67e0
Merge pull request #908 from wader/decode-align-structs
decode: Align some heavily used structs to save space
2024-04-01 18:25:08 +02:00
Mattias Wadman
b542ff1d6c lint: More linters and some fixes 2024-04-01 18:24:41 +02:00
Mattias Wadman
621d7f2c22 decode: Align some heavily used structs to save space
From betteralign:
Compound: 8 bytes saved: struct with 40 pointer bytes could be 32
Value: 40 bytes saved: struct with 128 pointer bytes could be 88
2024-04-01 18:12:31 +02:00
Mattias Wadman
56cd9e83ed
Merge pull request #907 from wader/update-gojq
gojq: Update fq fork
2024-04-01 15:26:54 +02:00
Mattias Wadman
f5fd587350 gojq: Update fq fork
Fixes issue using ascii_downcase and ascii_upcase with decode value.

From upstream https://github.com/itchyny/gojq/blob/main/CHANGELOG.md:
* implement `ltrim`, `rtrim`, and `trim` functions
* implement `gojq.ParseError` for getting the offset and token of query parsing error
* implement `gojq.HaltError` for detecting halt errors and stopping outer iteration
* fix object construction with duplicate keys (`{x:0,y:1} | {a:.x,a:.y}`)
* fix `halt` and `halt_error` functions to stop the command execution immediately
* fix variable scope of binding syntax (`"a" as $v | def f: $v; "b" as $v | f`)
* fix pre-defined variables to be available in initial modules (`$ARGS` in `~/.jq`)
* fix `ltrimstr` and `rtrimstr` functions to emit error on non-string input
* fix `nearbyint` and `rint` functions to round ties to even
* improve parser to allow `reduce`, `foreach`, `if`, `try`-`catch` syntax as object values
* remove `pow10` in favor of `exp10`, define `scalbn` and `scalbln` by `ldexp`
2024-04-01 15:15:26 +02:00
Mattias Wadman
90c0d9be94
Merge pull request #905 from wader/bump-make-golangci-lint-1.57.2
Update make-golangci-lint to 1.57.2 from 1.57.1
2024-03-29 18:03:02 +01:00
Mattias Wadman
7625b97a09
Merge pull request #906 from wader/bump-github-golangci-lint-1.57.2
Update github-golangci-lint to 1.57.2 from 1.57.1
2024-03-29 18:02:45 +01:00
bump
14aeab0b73 Update github-golangci-lint to 1.57.2 from 1.57.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.57.2
2024-03-29 16:03:39 +00:00
bump
a3b63b1037 Update make-golangci-lint to 1.57.2 from 1.57.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.57.2
2024-03-29 16:03:37 +00:00
Mattias Wadman
a00cfe0342
Merge pull request #904 from wader/vorbis-opus-syms
opus,vorbis: More sym snake_case
2024-03-27 22:45:14 +01:00
Mattias Wadman
80bccc91ed opus,vorbis: More sym snake_case 2024-03-27 18:30:27 +01:00
Mattias Wadman
ae519be2fd
Merge pull request #902 from wader/gojq-update-halt_error-rework
gojq: Update fq fork
2024-03-24 15:10:40 +01:00
Mattias Wadman
e26704049f gojq: Update fq fork
From upstream:
fix halt and halt_error to stop command immediately
2024-03-24 14:57:42 +01:00
Mattias Wadman
3c93e21cfd
Merge pull request #900 from wader/bump-make-golangci-lint-1.57.1
Update make-golangci-lint to 1.57.1 from 1.57.0
2024-03-21 18:09:46 +01:00
Mattias Wadman
689e9cc49a
Merge pull request #901 from wader/bump-github-golangci-lint-1.57.1
Update github-golangci-lint to 1.57.1 from 1.57.0
2024-03-21 18:09:34 +01:00
bump
72b4569b15 Update github-golangci-lint to 1.57.1 from 1.57.0
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.57.1
2024-03-21 16:03:48 +00:00
bump
4f55b6afc6 Update make-golangci-lint to 1.57.1 from 1.57.0
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.57.1
2024-03-21 16:03:43 +00:00
Mattias Wadman
c364e1b661
Merge pull request #898 from wader/bump-make-golangci-lint-1.57.0
Update make-golangci-lint to 1.57.0 from 1.56.2
2024-03-20 19:07:01 +01:00
Mattias Wadman
b8be180e31
Merge pull request #899 from wader/bump-github-golangci-lint-1.57.0
Update github-golangci-lint to 1.57.0 from 1.56.2
2024-03-20 19:06:41 +01:00
bump
82d96cf990 Update github-golangci-lint to 1.57.0 from 1.56.2
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.57.0
2024-03-20 16:04:53 +00:00
bump
94e80864d7 Update make-golangci-lint to 1.57.0 from 1.56.2
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.57.0
2024-03-20 16:04:49 +00:00
Mattias Wadman
8f3c9cef20
Merge pull request #897 from wader/mp4-add-thmb
mp4: Add thmb box support
2024-03-19 17:52:37 +01:00
Mattias Wadman
2ea70c42ac mp4: Add thmb box support 2024-03-19 17:44:37 +01:00
Mattias Wadman
961101ad0d
Merge pull request #896 from wader/mp4-qt-zero-byte-hdlr-component-name
mp4: Turns out for qt brand hdlr component name might be zero bytes
2024-03-19 17:14:42 +01:00
Mattias Wadman
ed3a126f0a mp4: Turns out for qt brand hdlr component name might be zero bytes
From QuickTime File Format specification:
A (counted) string that specifies the name of the component—that is, the media handler used
when this media was created. This field may contain a zero-length (empty) string.
2024-03-19 17:06:21 +01:00
Mattias Wadman
853f78decc
Merge pull request #895 from wader/doc-update
doc: Regenerate after nes and new ansisvg
2024-03-17 14:03:51 +01:00
Mattias Wadman
36e8287c2b doc: Regenerate after nes and new ansisvg 2024-03-17 13:45:38 +01:00
Mattias Wadman
8855d7addf
Merge pull request #893 from mlofjard/nes
nes: Add support for iNES/NES 2.0 ROM files
2024-03-16 19:27:53 +01:00
Mikael Lofjärd
f3b54042b1 nes: Add support for iNES/NES 2.0 ROM files 2024-03-16 19:18:21 +01:00
Mattias Wadman
b5a96e06e1
Merge pull request #894 from wader/pssh_playready-sym-snake_case
pssh_playready: Use snake_case sym values
2024-03-11 17:26:22 +01:00
Mattias Wadman
87052733e6 pssh_playready: Use snake_case sym values 2024-03-11 17:00:26 +01:00
Mattias Wadman
79e7c71c73
Merge pull request #892 from wader/eval-error-in-path
interp: Add todo test for eval error in path
2024-03-10 10:12:16 +01:00
Mattias Wadman
0db671f626 interp: Add todo test for eval error in path 2024-03-10 09:59:18 +01:00
Mattias Wadman
1e88b9d2c0
Merge pull request #890 from wader/bump-docker-golang-1.22.1
Update docker-golang to 1.22.1 from 1.22.0
2024-03-06 17:15:56 +01:00
Mattias Wadman
354f7eaabc
Merge pull request #891 from wader/bump-github-go-version-1.22.1
Update github-go-version to 1.22.1 from 1.22.0
2024-03-06 17:15:49 +01:00
bump
2657988daf Update github-go-version to 1.22.1 from 1.22.0 2024-03-06 16:03:51 +00:00
bump
9aa99b47a3 Update docker-golang to 1.22.1 from 1.22.0 2024-03-06 16:03:45 +00:00
Mattias Wadman
ac596de1ad
Merge pull request #888 from wader/bump-gomod-golang-x-net-0.22.0
Update gomod-golang-x-net to 0.22.0 from 0.21.0
2024-03-05 17:27:26 +01:00
bump
85f60df2a7 Update gomod-golang-x-net to 0.22.0 from 0.21.0
Tags https://github.com/golang/net/tags
2024-03-05 17:19:24 +01:00
Mattias Wadman
28ccfdd079
Merge pull request #889 from wader/bump-gomod-golang-x-term-0.18.0
Update gomod-golang-x-term to 0.18.0 from 0.17.0
2024-03-05 17:18:10 +01:00
Mattias Wadman
d30a8fe7bf
Merge pull request #887 from wader/bump-gomod-golang-x-crypto-0.21.0
Update gomod-golang-x-crypto to 0.21.0 from 0.20.0
2024-03-05 17:17:34 +01:00
bump
ba9ecb5418 Update gomod-golang-x-term to 0.18.0 from 0.17.0
Tags https://github.com/golang/term/tags
2024-03-05 16:03:45 +00:00
bump
043f067f27 Update gomod-golang-x-crypto to 0.21.0 from 0.20.0
Tags https://github.com/golang/crypto/tags
2024-03-05 16:03:39 +00:00
Mattias Wadman
f7815d4c41
Merge pull request #885 from thesamesam/which-hunt
pkg/cli/test_exp.sh: use command -v
2024-02-28 00:16:27 +01:00
Sam James
08df7f45c8
pkg/cli/test_exp.sh: use command -v
`which` is non-portable and not part of POSIX, but we can use `command -v`
for the same effect.

Debian [0] and Gentoo [1] are both trying to drop which from their base system.

[0] https://lwn.net/Articles/874049/
[1] https://bugs.gentoo.org/646588

Signed-off-by: Sam James <sam@gentoo.org>
2024-02-27 23:04:10 +00:00
Mattias Wadman
77b2c0225f
Merge pull request #884 from wader/bump-gomod-golang-x-crypto-0.20.0
Update gomod-golang-x-crypto to 0.20.0 from 0.19.0
2024-02-27 17:12:24 +01:00
bump
735256b905 Update gomod-golang-x-crypto to 0.20.0 from 0.19.0
Tags https://github.com/golang/crypto/tags
2024-02-27 16:03:54 +00:00
Mattias Wadman
e8b28a6d39
Merge pull request #883 from wader/diff-remove-dep
test: Replace pmezard/go-difflib with go's internal diff
2024-02-26 12:10:22 +01:00
Mattias Wadman
aaa43dfb81 test: Replace pmezard/go-difflib with go's internal diff 2024-02-26 11:39:03 +01:00
Mattias Wadman
e6f98ae148
Merge pull request #882 from wader/sort-formats
fq: Sort formats
2024-02-18 16:41:55 +01:00
Mattias Wadman
7500a8b767 fq: Sort formats 2024-02-18 16:33:39 +01:00
Mattias Wadman
ae296218cb
Merge pull request #880 from wader/bump-make-golangci-lint-1.56.2
Update make-golangci-lint to 1.56.2 from 1.56.1
2024-02-16 17:24:55 +01:00
Mattias Wadman
3f5996171b
Merge pull request #881 from wader/bump-github-golangci-lint-1.56.2
Update github-golangci-lint to 1.56.2 from 1.56.1
2024-02-16 17:24:40 +01:00
bump
a577c3987c Update github-golangci-lint to 1.56.2 from 1.56.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.56.2
2024-02-16 16:03:48 +00:00
bump
1c24f64d9b Update make-golangci-lint to 1.56.2 from 1.56.1
Release notes https://github.com/golangci/golangci-lint/releases/tag/v1.56.2
2024-02-16 16:03:45 +00:00
Mattias Wadman
a8dd146cb2
Merge pull request #879 from wader/doc-add-imhex
doc: Add ImHex to related tools
2024-02-15 11:20:36 +01:00
Mattias Wadman
e741ca7888 doc: Add ImHex to related tools 2024-02-15 10:31:54 +01:00
Mattias Wadman
f8f4473afd repl: A bit nicer array completion 2023-05-13 21:39:56 +02:00
252 changed files with 39120 additions and 2960 deletions

View File

@ -7,7 +7,7 @@ on:
pull_request:
env:
GOLANGCILINT_VERSION: "1.56.1"
GOLANGCILINT_VERSION: "1.58.2"
jobs:
lint:
@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.22.0"
go-version: "1.22.3"
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.22.0"
go-version: "1.22.3"
- name: Test
env:
GOARCH: ${{ matrix.goarch }}

View File

@ -15,8 +15,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.22.0"
- uses: goreleaser/goreleaser-action@v2
go-version: "1.22.3"
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest

View File

@ -23,6 +23,8 @@ linters:
- unconvert
- unparam
- wastedassign
- staticcheck
- govet
linters-settings:
revive:
@ -41,6 +43,13 @@ linters-settings:
- rela
- equalisation
- synchronisation
govet:
enable-all: true
disable:
- fieldalignment
- shadow
staticcheck:
checks: ["all"]
run:
timeout: 5m

View File

@ -59,7 +59,7 @@ brews:
repository:
owner: wader
name: homebrew-tap
folder: Formula
directory: Formula
homepage: https://github.com/wader/fq
description: jq for binary formats
license: MIT

View File

@ -1,3 +1,88 @@
# 0.11.0
New iNES/NES 2.0 ROM decoder (thanks @mlofjard) and basic JPEG 2000 format support. jq language improvements and fixes from gojq. And as always various decoder improvements and fixes.
## Changes
- Add `string_truncate` option to configure how to truncate long strings when displaying a decode value tree. `dd`, `dv` etc set truncate length to zero to not truncate. #919
- gojq updates from upstream:
- Implement `ltrim`, `rtrim`, and `trim` functions
- Fix object construction with duplicate keys (`{x:0,y:1} | {a:.x,a:.y}`)
- Fix `halt` and `halt_error` functions to stop the command execution immediately
- Fix variable scope of binding syntax (`"a" as $v | def f: $v; "b" as $v | f`)
- Fix `ltrimstr` and `rtrimstr` functions to emit error on non-string input
- Fix `nearbyint` and `rint` functions to round ties to even
- Improve parser to allow `reduce`, `foreach`, `if`, `try`-`catch` syntax as object values
- Remove `pow10` in favor of `exp10`, define `scalbn` and `scalbln` by `ldexp`
- Fix issue using decode value with `ltrimstr`/`rtrimstr`.
## Format changes
- `fit`
- Skip array fields on pre read messages. #878
- Fixed subfield referencing fields below self in message. #877
- `jp2c` New JPEG 2000 codestream decoder. #928
- `icc_profile` Strip whitespace in header and tag strings. #912
- `mp4`
- Add `jp2c`, `jp2h`, `ihdr` `jP` JPEG 2000 related boxes support. #928
- Add `thmb` box support. #897
- Turns out for qt brand `hdlr` component name might be zero bytes. #896
- `nes` New iNES/NES 2.0 ROM decoder (thanks @mlofjard). #893
## Changelog
* f7b067b6 Fixed subfield referencing fields below self in message
* 9aa99b47 Update docker-golang to 1.22.1 from 1.22.0
* 0afb5b59 Update docker-golang to 1.22.2 from 1.22.1
* 2657988d Update github-go-version to 1.22.1 from 1.22.0
* 33c93918 Update github-go-version to 1.22.2 from 1.22.1
* a577c398 Update github-golangci-lint to 1.56.2 from 1.56.1
* 82d96cf9 Update github-golangci-lint to 1.57.0 from 1.56.2
* 72b4569b Update github-golangci-lint to 1.57.1 from 1.57.0
* 14aeab0b Update github-golangci-lint to 1.57.2 from 1.57.1
* 735256b9 Update gomod-golang-x-crypto to 0.20.0 from 0.19.0
* 043f067f Update gomod-golang-x-crypto to 0.21.0 from 0.20.0
* 15a7060b Update gomod-golang-x-crypto to 0.22.0 from 0.21.0
* 85f60df2 Update gomod-golang-x-net to 0.22.0 from 0.21.0
* 77c000e6 Update gomod-golang-x-net to 0.23.0 from 0.22.0
* daba6b54 Update gomod-golang-x-net to 0.24.0 from 0.23.0
* ba9ecb54 Update gomod-golang-x-term to 0.18.0 from 0.17.0
* b2aa59f7 Update gomod-golang-x-term to 0.19.0 from 0.18.0
* 1c24f64d Update make-golangci-lint to 1.56.2 from 1.56.1
* 94e80864 Update make-golangci-lint to 1.57.0 from 1.56.2
* 4f55b6af Update make-golangci-lint to 1.57.1 from 1.57.0
* a3b63b10 Update make-golangci-lint to 1.57.2 from 1.57.1
* 208b3e6b chore: fix function name in comment
* 621d7f2c decode: Align some heavily used structs to save space
* ee2ee24d decode: Cleanup io panic a bit
* e741ca78 doc: Add ImHex to related tools
* 36e8287c doc: Regenerate after nes and new ansisvg
* 225fd507 fit: Skip array fields on pre read messages
* 7500a8b7 fq: Sort formats
* bf7fa07c fq: Use go 1.20 and cleanup
* e2670404 gojq: Update fq fork
* f5fd5873 gojq: Update fq fork
* ed685116 icc_profile: Strip whitespace in header and tag strings
* c8f9cdc9 interp: Add string_truncate option
* 0db671f6 interp: Add todo test for eval error in path
* ebffb3be jp2c: Add jpeg2000 codestream format
* 79992b34 jp2c: Fail probe faster
* 63f7d79c jp2c: Support probe
* b542ff1d lint: More linters and some fixes
* c6165c0c mod: go get non-bump tracked modules
* 1784c438 mp4,avi: Trim spaces for type
* 2ea70c42 mp4: Add thmb box support
* 4f90a2ea mp4: Decode jP box
* 70b1b0d6 mp4: Decode uinf box
* 87b6c4dd mp4: Fix jp2 test
* 8009b6f6 mp4: JPEG200 boxes jp2h and ihdr
* ed3a126f mp4: Turns out for qt brand hdlr component name might be zero bytes
* f3b54042 nes: Add support for iNES/NES 2.0 ROM files
* 80bccc91 opus,vorbis: More sym snake_case
* 08df7f45 pkg/cli/test_exp.sh: use command -v
* 87052733 pssh_playready: Use snake_case sym values
* aaa43dfb test: Replace pmezard/go-difflib with go's internal diff
# 0.10.0
Adds support for various LevelDB formats (thanks @mikez) and Garmin Flexible and Interoperable Data Transfer format (FIT) (thanks @mlofjard).
@ -43,7 +128,6 @@ And as usual some small fixes and dependency updates.
$ fq -L . -r 'include "to_kml"; to_kml' file.fit > file.kml
```
- `hevc_sps` Fix some incorrect profile_tier_level decoding. #829
- `html` Fix issue parsing elements including SOLIDUS "/". #870
- Upstream issue https://github.com/golang/go/issues/63402

View File

@ -1,5 +1,5 @@
# bump: docker-golang /FROM golang:([\d.]+)/ docker:golang|^1
FROM golang:1.22.0-bookworm AS base
FROM golang:1.22.3-bookworm AS base
# expect is used to test cli
RUN \

View File

@ -61,7 +61,7 @@ gogenerate: always
lint: always
# bump: make-golangci-lint /golangci-lint@v([\d.]+)/ git:https://github.com/golangci/golangci-lint.git|^1
# bump: make-golangci-lint link "Release notes" https://github.com/golangci/golangci-lint/releases/tag/v$LATEST
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.1 run
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.58.2 run
depgraph.svg: always
go run github.com/kisielk/godepgraph@latest github.com/wader/fq | dot -Tsvg -o godepgraph.svg

View File

@ -2,25 +2,23 @@
Tool, language and decoders for working with binary data.
TLDR: it aims to be jq, hexdump, dd and gdb for files combined into one.
![fq demo](doc/demo.svg)
Basic usage is `fq . file` or `fq d file`.
Basic usage is `fq . file`, `fq d file` or `fq 'some query' file ...`.
For details see [usage.md](doc/usage.md).
### Background
fq is inspired by the well known jq tool and language that allows you to work with binary formats the same way you would using jq. In addition it can present data like a hex viewer, transform, slice and concatenate binary data. It also supports nested formats and has an interactive REPL with auto-completion.
fq is inspired by the [jq](https://jqlang.github.io/jq/) tool and language and allows you to work with binary formats in the same way. In addition to using jq expressions it can also present decoded tree structures, transform, slice and concatenate binary data. It also supports nested formats and features an interactive REPL with auto-completion of functions and names.
It was originally designed to query, inspect and debug media codecs and containers like mp4, flac, mp3, jpeg. But since then it has been extended to support a variety of formats like executables, packet captures (with TCP reassembly) and serialization formats like JSON, YAML, XML, ASN1 BER, Avro, CBOR, protobuf. In addition it also has functions to work with URLs, convert to/from hex, number bases, search for things etc.
In summary it aims to be jq, hexdump, dd and gdb for files combined into one.
**NOTE:** fq is still early in development so things might change, be broken or do not make sense. That also means that there is a great opportunity to help out!
It was originally designed to query, inspect and debug media codecs and containers like MP4, FLAC and JPEG but has since been extended to support a variety of formats like executables, packet captures (with TCP reassembly) and serialization formats like JSON, YAML, XML, CBOR, protobuf. In addition it also has functions to work with URLs, convert to/from hex, number bases, search for patterns etc.
### Goals
- Make binaries accessible, queryable and sliceable.
- Make binaries more accessible, queryable and sliceable.
- Nested formats and bit-oriented decoding.
- Quick and comfortable CLI tool.
- Bits and bytes transformations.
@ -100,6 +98,7 @@ id3v11,
id3v2,
ipv4_packet,
ipv6_packet,
jp2c,
jpeg,
json,
jsonl,
@ -124,6 +123,7 @@ mpeg_pes_packet,
mpeg_spu,
mpeg_ts,
[msgpack](doc/formats.md#msgpack),
[nes](doc/formats.md#nes),
ogg,
ogg_page,
[opentimestamps](doc/formats.md#opentimestamps),
@ -239,9 +239,9 @@ apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing fq
### Build from source
Make sure you have [go](https://go.dev) 1.18 or later installed.
Make sure you have [go](https://go.dev) 1.20 or later installed.
To install directly from git repository (no clone needed):
To install directly from git repository (no git clone needed):
```sh
# build and install latest release
go install github.com/wader/fq@latest
@ -265,10 +265,6 @@ go build -o fq .
make test fq
```
## TODO and ideas
See [TODO.md](doc/TODO.md)
## Development and adding a new decoder
See [dev.md](doc/dev.md)
@ -285,6 +281,7 @@ for inventing the [jq](https://github.com/stedolan/jq) language.
#### Tools
- [HexFiend](https://github.com/HexFiend/HexFiend) - Hex editor for macOS with format template support.
- [ImHex](https://github.com/WerWolv/ImHex) - A Hex Editor for Reverse Engineers.
- [binspector](https://github.com/binspector/binspector) - Binary format analysis tool with query language and REPL.
- [kaitai](https://kaitai.io) - Declarative binary format parsing.
- [Wireshark](https://www.wireshark.org) - Decodes network traffic (tip: `tshark -T json`).
@ -303,6 +300,10 @@ for inventing the [jq](https://github.com/stedolan/jq) language.
- [Sustainability of Digital Formats](https://www.loc.gov/preservation/digital/formats/) at Library of Congress.
- [Data Format Description Language (DFDL)](https://en.wikipedia.org/wiki/Data_Format_Description_Language).
## TODO and ideas
See [TODO.md](doc/TODO.md)
## License
`fq` is distributed under the terms of the MIT License.

View File

@ -1,3 +1,5 @@
//go:build exclude
// tool to convert go fuzz input files to bytes
// Usage: cat format/testdata/fuzz/FuzzFormats/144bde49b40c90fd05d302ec90b6ddb2b6d6aea553bad520a8b954797e40fe72 | go run dev/fuzzbytes.go | go run .
package main

View File

@ -1,3 +1,5 @@
//go:build exclude
package main
import (

View File

@ -28,49 +28,47 @@
.fa15 { fill: #ffffff; }
</style>
<rect width="100%" height="100%" x="0" y="0" style="fill: #000000"/>
<g x="0">
<text y="0.5em"><tspan class="fa15"># Overview of mp3 file</tspan></text>
<text y="1.5em"><tspan>$ fq . file.mp3</tspan></text>
<text y="2.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.{}: file.mp3 (mp3)</tspan></text>
<text y="3.5em"><tspan class="fa3">0x000</tspan><tspan>│49 44 33 </tspan><tspan class="bold">04 </tspan><tspan class="fa8">00 00 00 00 </tspan><tspan class="bold">15 </tspan><tspan>39 54 53 53 45 </tspan><tspan class="fa8">00 00</tspan><tspan>│ID3</tspan><tspan class="bold">.</tspan><tspan class="fa8">....</tspan><tspan class="bold">.</tspan><tspan>9TSSE</tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">headers</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]:</tspan></text>
<text y="4.5em"><tspan class="fa3">* </tspan><tspan>│until 0xac2.7 (2755) │ │</tspan></text>
<text y="5.5em"><tspan class="fa3">0xac0</tspan><tspan></tspan><tspan class="bold">ff fb </tspan><tspan>40 </tspan><tspan class="bold">c0 </tspan><tspan class="fa8">00 00 00 00 00 00 00 00 00</tspan><tspan></tspan><tspan class="bold">..</tspan><tspan>@</tspan><tspan class="bold">.</tspan><tspan class="fa8">.........</tspan><tspan></tspan><tspan class="fa12">frames</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">3</tspan><tspan>]:</tspan></text>
<text y="6.5em"><tspan class="fa3">0xad0</tspan><tspan></tspan><tspan class="fa8">00 00 00 00 00 00 00 00 </tspan><tspan>49 6e 66 6f </tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">0f</tspan><tspan></tspan><tspan class="fa8">........</tspan><tspan>Info</tspan><tspan class="fa8">...</tspan><tspan class="bold">.</tspan><tspan></tspan></text>
<text y="7.5em"><tspan class="fa3">* </tspan><tspan>│until 0xd19.7 (end) (599) │ │</tspan></text>
<text y="8.5em"><tspan> │ │ │ </tspan><tspan class="fa12">footers</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">0</tspan><tspan>]:</tspan></text>
<text y="10.5em"><tspan class="fa15"># Show header of first ID3v2 tag inside mp3 file</tspan></text>
<text y="11.5em"><tspan>$ fq &#39;.headers[0].header&#39; file.mp3</tspan></text>
<text y="12.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">headers</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>].</tspan><tspan class="fa12">header</tspan><tspan>{}:</tspan></text>
<text y="13.5em"><tspan class="fa3">0x0</tspan><tspan>│49 44 33 │ID3 │ </tspan><tspan class="fa12">magic</tspan><tspan>: </tspan><tspan class="fa2">&#34;ID3&#34; </tspan><tspan>(valid)</tspan></text>
<text y="14.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="bold">04 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">4 </tspan><tspan>(valid)</tspan></text>
<text y="15.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">revision</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text y="16.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>{}:</tspan></text>
<text y="17.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="fa8">00 00 </tspan><tspan class="bold">15 </tspan><tspan>39 │ </tspan><tspan class="fa8">..</tspan><tspan class="bold">.</tspan><tspan>9 │ </tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">2745</tspan></text>
<text y="19.5em"><tspan class="fa15"># Show encoder software used</tspan></text>
<text y="20.5em"><tspan>$ fq -r &#39;.frames[0].tag.encoder | tovalue&#39; file.mp3</tspan></text>
<text y="21.5em"><tspan>Lavc58.13</tspan></text>
<text y="23.5em"><tspan class="fa15"># Decode at two offsets as mp3_frame and show bitrate</tspan></text>
<text y="24.5em"><tspan>$ fq -d bytes &#39;.[0xb79,0xc49:] | mp3_frame.header.bitrate&#39; file.mp3</tspan></text>
<text y="25.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan></tspan></text>
<text y="26.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │.</tspan><tspan class="fa12">header</tspan><tspan>.</tspan><tspan class="fa12">bitrate</tspan><tspan>: </tspan><tspan class="fa6">64000 </tspan><tspan>(</tspan><tspan class="fa6">5</tspan><tspan>)</tspan></text>
<text y="27.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan></tspan></text>
<text y="28.5em"><tspan class="fa3">0xc40</tspan><tspan>│ 52 │ R │.</tspan><tspan class="fa12">header</tspan><tspan>.</tspan><tspan class="fa12">bitrate</tspan><tspan>: </tspan><tspan class="fa6">64000 </tspan><tspan>(</tspan><tspan class="fa6">5</tspan><tspan>)</tspan></text>
<text y="30.5em"><tspan class="fa15"># Extract PNG file</tspan></text>
<text y="31.5em"><tspan>$ fq &#39;.headers[].frames[] | select(.id == &#34;APIC&#34;)?.picture | tobits&#39; file.mp3 &gt;file.png</tspan></text>
<text y="32.5em"><tspan>$ file file.png</tspan></text>
<text y="33.5em"><tspan>file.png: PNG image data, 320 x 240, 8-bit/color RGB, non-interlaced</tspan></text>
<text y="35.5em"><tspan class="fa15"># Resolution of embedded PNG cover art as YAML</tspan></text>
<text y="36.5em"><tspan>$ fq -r &#39;.headers[0].frames[] | grep_by(.id == &#34;APIC&#34;) | grep_by(.type == &#34;IHDR&#34;) | {res: {width, height}} | to_yaml&#39; file.mp3</tspan></text>
<text y="37.5em"><tspan>res:</tspan></text>
<text y="38.5em"><tspan> height: 240</tspan></text>
<text y="39.5em"><tspan> width: 320</tspan></text>
<text y="41.5em"><tspan class="fa15"># Add query parameter to URL</tspan></text>
<text y="42.5em"><tspan>$ echo &#39;http://host?a=b&#39; | fq -Rr &#39;from_url | .query.b = &#34;a b c&#34; | to_url&#39;</tspan></text>
<text y="43.5em"><tspan>http://host?a=b&amp;b=a&#43;b&#43;c</tspan></text>
<text y="45.5em"><tspan class="fa15"># Extract JSON and base64 encoded query parameter p</tspan></text>
<text y="46.5em"><tspan>$ echo &#39;https://host?p=eyJhIjoiaGVsbG8ifQ%3D%3D&#39; | fq -R &#39;from_url.query.p | from_base64 | fromjson&#39;</tspan></text>
<text y="47.5em"><tspan>{</tspan></text>
<text y="48.5em"><tspan> </tspan><tspan class="fa12">&#34;a&#34;</tspan><tspan>: </tspan><tspan class="fa2">&#34;hello&#34;</tspan></text>
<text y="49.5em"><tspan>}</tspan></text>
</g>
<text x="0ch" y="0.5em"><tspan class="fa15"># Overview of mp3 file</tspan></text>
<text x="0ch" y="1.5em"><tspan>$ fq . file.mp3</tspan></text>
<text x="0ch" y="2.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.{}: file.mp3 (mp3)</tspan></text>
<text x="0ch" y="3.5em"><tspan class="fa3">0x000</tspan><tspan>│49 44 33 </tspan><tspan class="bold">04 </tspan><tspan class="fa8">00 00 00 00 </tspan><tspan class="bold">15 </tspan><tspan>39 54 53 53 45 </tspan><tspan class="fa8">00 00</tspan><tspan>│ID3</tspan><tspan class="bold">.</tspan><tspan class="fa8">....</tspan><tspan class="bold">.</tspan><tspan>9TSSE</tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">headers</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]:</tspan></text>
<text x="0ch" y="4.5em"><tspan class="fa3">* </tspan><tspan>│until 0xac2.7 (2755) │ │</tspan></text>
<text x="0ch" y="5.5em"><tspan class="fa3">0xac0</tspan><tspan></tspan><tspan class="bold">ff fb </tspan><tspan>40 </tspan><tspan class="bold">c0 </tspan><tspan class="fa8">00 00 00 00 00 00 00 00 00</tspan><tspan></tspan><tspan class="bold">..</tspan><tspan>@</tspan><tspan class="bold">.</tspan><tspan class="fa8">.........</tspan><tspan></tspan><tspan class="fa12">frames</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">3</tspan><tspan>]:</tspan></text>
<text x="0ch" y="6.5em"><tspan class="fa3">0xad0</tspan><tspan></tspan><tspan class="fa8">00 00 00 00 00 00 00 00 </tspan><tspan>49 6e 66 6f </tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">0f</tspan><tspan></tspan><tspan class="fa8">........</tspan><tspan>Info</tspan><tspan class="fa8">...</tspan><tspan class="bold">.</tspan><tspan></tspan></text>
<text x="0ch" y="7.5em"><tspan class="fa3">* </tspan><tspan>│until 0xd19.7 (end) (599) │ │</tspan></text>
<text x="0ch" y="8.5em"><tspan> │ │ │ </tspan><tspan class="fa12">footers</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">0</tspan><tspan>]:</tspan></text>
<text x="0ch" y="10.5em"><tspan class="fa15"># Show header of first ID3v2 tag inside mp3 file</tspan></text>
<text x="0ch" y="11.5em"><tspan>$ fq &#39;.headers[0].header&#39; file.mp3</tspan></text>
<text x="0ch" y="12.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">headers</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>].</tspan><tspan class="fa12">header</tspan><tspan>{}:</tspan></text>
<text x="0ch" y="13.5em"><tspan class="fa3">0x0</tspan><tspan>│49 44 33 │ID3 │ </tspan><tspan class="fa12">magic</tspan><tspan>: </tspan><tspan class="fa2">&#34;ID3&#34; </tspan><tspan>(valid)</tspan></text>
<text x="0ch" y="14.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="bold">04 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">4 </tspan><tspan>(valid)</tspan></text>
<text x="0ch" y="15.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">revision</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text x="0ch" y="16.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>{}:</tspan></text>
<text x="0ch" y="17.5em"><tspan class="fa3">0x0</tspan><tspan></tspan><tspan class="fa8">00 00 </tspan><tspan class="bold">15 </tspan><tspan>39 │ </tspan><tspan class="fa8">..</tspan><tspan class="bold">.</tspan><tspan>9 │ </tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">2745</tspan></text>
<text x="0ch" y="19.5em"><tspan class="fa15"># Show encoder software used</tspan></text>
<text x="0ch" y="20.5em"><tspan>$ fq -r &#39;.frames[0].tag.encoder | tovalue&#39; file.mp3</tspan></text>
<text x="0ch" y="21.5em"><tspan>Lavc58.13</tspan></text>
<text x="0ch" y="23.5em"><tspan class="fa15"># Decode at two offsets as mp3_frame and show bitrate</tspan></text>
<text x="0ch" y="24.5em"><tspan>$ fq -d bytes &#39;.[0xb79,0xc49:] | mp3_frame.header.bitrate&#39; file.mp3</tspan></text>
<text x="0ch" y="25.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan></tspan></text>
<text x="0ch" y="26.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │.</tspan><tspan class="fa12">header</tspan><tspan>.</tspan><tspan class="fa12">bitrate</tspan><tspan>: </tspan><tspan class="fa6">64000 </tspan><tspan>(</tspan><tspan class="fa6">5</tspan><tspan>)</tspan></text>
<text x="0ch" y="27.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan></tspan></text>
<text x="0ch" y="28.5em"><tspan class="fa3">0xc40</tspan><tspan>│ 52 │ R │.</tspan><tspan class="fa12">header</tspan><tspan>.</tspan><tspan class="fa12">bitrate</tspan><tspan>: </tspan><tspan class="fa6">64000 </tspan><tspan>(</tspan><tspan class="fa6">5</tspan><tspan>)</tspan></text>
<text x="0ch" y="30.5em"><tspan class="fa15"># Extract PNG file</tspan></text>
<text x="0ch" y="31.5em"><tspan>$ fq &#39;.headers[].frames[] | select(.id == &#34;APIC&#34;)?.picture | tobits&#39; file.mp3 &gt;file.png</tspan></text>
<text x="0ch" y="32.5em"><tspan>$ file file.png</tspan></text>
<text x="0ch" y="33.5em"><tspan>file.png: PNG image data, 320 x 240, 8-bit/color RGB, non-interlaced</tspan></text>
<text x="0ch" y="35.5em"><tspan class="fa15"># Resolution of embedded PNG cover art as YAML</tspan></text>
<text x="0ch" y="36.5em"><tspan>$ fq -r &#39;.headers[0].frames[] | grep_by(.id == &#34;APIC&#34;) | grep_by(.type == &#34;IHDR&#34;) | {res: {width, height}} | to_yaml&#39; file.mp3</tspan></text>
<text x="0ch" y="37.5em"><tspan>res:</tspan></text>
<text x="0ch" y="38.5em"><tspan> height: 240</tspan></text>
<text x="0ch" y="39.5em"><tspan> width: 320</tspan></text>
<text x="0ch" y="41.5em"><tspan class="fa15"># Add query parameter to URL</tspan></text>
<text x="0ch" y="42.5em"><tspan>$ echo &#39;http://host?a=b&#39; | fq -Rr &#39;from_url | .query.b = &#34;a b c&#34; | to_url&#39;</tspan></text>
<text x="0ch" y="43.5em"><tspan>http://host?a=b&amp;b=a&#43;b&#43;c</tspan></text>
<text x="0ch" y="45.5em"><tspan class="fa15"># Extract JSON and base64 encoded query parameter p</tspan></text>
<text x="0ch" y="46.5em"><tspan>$ echo &#39;https://host?p=eyJhIjoiaGVsbG8ifQ%3D%3D&#39; | fq -R &#39;from_url.query.p | from_base64 | fromjson&#39;</tspan></text>
<text x="0ch" y="47.5em"><tspan>{</tspan></text>
<text x="0ch" y="48.5em"><tspan> </tspan><tspan class="fa12">&#34;a&#34;</tspan><tspan>: </tspan><tspan class="fa2">&#34;hello&#34;</tspan></text>
<text x="0ch" y="49.5em"><tspan>}</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -236,8 +236,8 @@ make test
go test ./...
# run all tests for one format
go test -run TestFormats/mp4 ./format/
# update all actual outputs in tests
go test ./... -update
# update all expected outputs for tests
go test ./pkg/interp ./format -update
# update actual output for specific tests
go run ./format -run TestFormats/elf -update
# color diff

View File

@ -27,16 +27,14 @@
.fa12 { fill: #5555ff; }
</style>
<rect width="100%" height="100%" x="0" y="0" style="fill: #000000"/>
<g x="0">
<text y="0.5em"><tspan>$ fq &#39;first(grep_by(.type == &#34;elst&#34;))&#39; file.mp4</tspan></text>
<text y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">3</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>]{}: box</tspan></text>
<text y="2.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">1c </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">28</tspan></text>
<text y="3.5em"><tspan class="fa3">0xd60</tspan><tspan>│ 65 6c 73 74 │ elst │ </tspan><tspan class="fa12">type</tspan><tspan>: </tspan><tspan class="fa2">&#34;elst&#34; </tspan><tspan>(An edit list)</tspan></text>
<text y="4.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text y="5.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00</tspan><tspan></tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text y="6.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
<text y="7.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">01 </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">entry_count</tspan><tspan>: </tspan><tspan class="fa6">1</tspan></text>
<text y="8.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan>28 </tspan><tspan class="fa8">00 00 00 00 00 </tspan><tspan class="bold">01 </tspan><tspan class="fa8">00</tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan>(</tspan><tspan class="fa8">.....</tspan><tspan class="bold">.</tspan><tspan class="fa8">.</tspan><tspan></tspan><tspan class="fa12">entries</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]:</tspan></text>
<text y="9.5em"><tspan class="fa3">0xd80</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
</g>
<text x="0ch" y="0.5em"><tspan>$ fq &#39;first(grep_by(.type == &#34;elst&#34;))&#39; file.mp4</tspan></text>
<text x="0ch" y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">3</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>]{}: box</tspan></text>
<text x="0ch" y="2.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">1c </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">28</tspan></text>
<text x="0ch" y="3.5em"><tspan class="fa3">0xd60</tspan><tspan>│ 65 6c 73 74 │ elst │ </tspan><tspan class="fa12">type</tspan><tspan>: </tspan><tspan class="fa2">&#34;elst&#34; </tspan><tspan>(An edit list)</tspan></text>
<text x="0ch" y="4.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text x="0ch" y="5.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00</tspan><tspan></tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text x="0ch" y="6.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
<text x="0ch" y="7.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">01 </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">entry_count</tspan><tspan>: </tspan><tspan class="fa6">1</tspan></text>
<text x="0ch" y="8.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan>28 </tspan><tspan class="fa8">00 00 00 00 00 </tspan><tspan class="bold">01 </tspan><tspan class="fa8">00</tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan>(</tspan><tspan class="fa8">.....</tspan><tspan class="bold">.</tspan><tspan class="fa8">.</tspan><tspan></tspan><tspan class="fa12">entries</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]:</tspan></text>
<text x="0ch" y="9.5em"><tspan class="fa3">0xd80</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -27,20 +27,18 @@
.fa12 { fill: #5555ff; }
</style>
<rect width="100%" height="100%" x="0" y="0" style="fill: #000000"/>
<g x="0">
<text y="0.5em"><tspan>$ fq &#39;first(grep_by(.type == &#34;elst&#34;)) | d&#39; file.mp4</tspan></text>
<text y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">3</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>]{}: box</tspan></text>
<text y="2.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">1c </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">28</tspan></text>
<text y="3.5em"><tspan class="fa3">0xd60</tspan><tspan>│ 65 6c 73 74 │ elst │ </tspan><tspan class="fa12">type</tspan><tspan>: </tspan><tspan class="fa2">&#34;elst&#34; </tspan><tspan>(An edit list)</tspan></text>
<text y="4.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text y="5.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00</tspan><tspan></tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text y="6.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
<text y="7.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">01 </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">entry_count</tspan><tspan>: </tspan><tspan class="fa6">1</tspan></text>
<text y="8.5em"><tspan> │ │ │ </tspan><tspan class="fa12">entries</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]:</tspan></text>
<text y="9.5em"><tspan> │ │ │ [</tspan><tspan class="fa6">0</tspan><tspan>]{}: entry</tspan></text>
<text y="10.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan>28 │ </tspan><tspan class="fa8">...</tspan><tspan>( │ </tspan><tspan class="fa12">segment_duration</tspan><tspan>: </tspan><tspan class="fa6">40</tspan></text>
<text y="11.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 00 </tspan><tspan></tspan><tspan class="fa8">.... </tspan><tspan></tspan><tspan class="fa12">media_time</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text y="12.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan class="bold">01 </tspan><tspan class="fa8">00</tspan><tspan></tspan><tspan class="fa8">.</tspan><tspan class="bold">.</tspan><tspan class="fa8">.</tspan><tspan></tspan><tspan class="fa12">media_rate</tspan><tspan>: </tspan><tspan class="fa6">1</tspan></text>
<text y="13.5em"><tspan class="fa3">0xd80</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
</g>
<text x="0ch" y="0.5em"><tspan>$ fq &#39;first(grep_by(.type == &#34;elst&#34;)) | d&#39; file.mp4</tspan></text>
<text x="0ch" y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">3</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>]{}: box</tspan></text>
<text x="0ch" y="2.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">1c </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">28</tspan></text>
<text x="0ch" y="3.5em"><tspan class="fa3">0xd60</tspan><tspan>│ 65 6c 73 74 │ elst │ </tspan><tspan class="fa12">type</tspan><tspan>: </tspan><tspan class="fa2">&#34;elst&#34; </tspan><tspan>(An edit list)</tspan></text>
<text x="0ch" y="4.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text x="0ch" y="5.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00</tspan><tspan></tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text x="0ch" y="6.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
<text x="0ch" y="7.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">01 </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">entry_count</tspan><tspan>: </tspan><tspan class="fa6">1</tspan></text>
<text x="0ch" y="8.5em"><tspan> │ │ │ </tspan><tspan class="fa12">entries</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]:</tspan></text>
<text x="0ch" y="9.5em"><tspan> │ │ │ [</tspan><tspan class="fa6">0</tspan><tspan>]{}: entry</tspan></text>
<text x="0ch" y="10.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan>28 │ </tspan><tspan class="fa8">...</tspan><tspan>( │ </tspan><tspan class="fa12">segment_duration</tspan><tspan>: </tspan><tspan class="fa6">40</tspan></text>
<text x="0ch" y="11.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 00 </tspan><tspan></tspan><tspan class="fa8">.... </tspan><tspan></tspan><tspan class="fa12">media_time</tspan><tspan>: </tspan><tspan class="fa6">0</tspan></text>
<text x="0ch" y="12.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan class="bold">01 </tspan><tspan class="fa8">00</tspan><tspan></tspan><tspan class="fa8">.</tspan><tspan class="bold">.</tspan><tspan class="fa8">.</tspan><tspan></tspan><tspan class="fa12">media_rate</tspan><tspan>: </tspan><tspan class="fa6">1</tspan></text>
<text x="0ch" y="13.5em"><tspan class="fa3">0xd80</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -27,20 +27,18 @@
.fa12 { fill: #5555ff; }
</style>
<rect width="100%" height="100%" x="0" y="0" style="fill: #000000"/>
<g x="0">
<text y="0.5em"><tspan>$ fq &#39;first(grep_by(.type == &#34;elst&#34;)) | dv&#39; file.mp4</tspan></text>
<text y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">3</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>]{}: box 0xd65-0xd81 (28)</tspan></text>
<text y="2.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">1c </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">28 </tspan><tspan>0xd65-0xd69 (4)</tspan></text>
<text y="3.5em"><tspan class="fa3">0xd60</tspan><tspan>│ 65 6c 73 74 │ elst │ </tspan><tspan class="fa12">type</tspan><tspan>: </tspan><tspan class="fa2">&#34;elst&#34; </tspan><tspan>(An edit list) 0xd69-0xd6d (4)</tspan></text>
<text y="4.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xd6d-0xd6e (1)</tspan></text>
<text y="5.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00</tspan><tspan></tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xd6e-0xd71 (3)</tspan></text>
<text y="6.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
<text y="7.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">01 </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">entry_count</tspan><tspan>: </tspan><tspan class="fa6">1 </tspan><tspan>0xd71-0xd75 (4)</tspan></text>
<text y="8.5em"><tspan> │ │ │ </tspan><tspan class="fa12">entries</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]: 0xd75-0xd81 (12)</tspan></text>
<text y="9.5em"><tspan> │ │ │ [</tspan><tspan class="fa6">0</tspan><tspan>]{}: entry 0xd75-0xd81 (12)</tspan></text>
<text y="10.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan>28 │ </tspan><tspan class="fa8">...</tspan><tspan>( │ </tspan><tspan class="fa12">segment_duration</tspan><tspan>: </tspan><tspan class="fa6">40 </tspan><tspan>0xd75-0xd79 (4)</tspan></text>
<text y="11.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 00 </tspan><tspan></tspan><tspan class="fa8">.... </tspan><tspan></tspan><tspan class="fa12">media_time</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xd79-0xd7d (4)</tspan></text>
<text y="12.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan class="bold">01 </tspan><tspan class="fa8">00</tspan><tspan></tspan><tspan class="fa8">.</tspan><tspan class="bold">.</tspan><tspan class="fa8">.</tspan><tspan></tspan><tspan class="fa12">media_rate</tspan><tspan>: </tspan><tspan class="fa6">1 </tspan><tspan>0xd7d-0xd81 (4)</tspan></text>
<text y="13.5em"><tspan class="fa3">0xd80</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
</g>
<text x="0ch" y="0.5em"><tspan>$ fq &#39;first(grep_by(.type == &#34;elst&#34;)) | dv&#39; file.mp4</tspan></text>
<text x="0ch" y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">3</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">boxes</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>]{}: box 0xd65-0xd81 (28)</tspan></text>
<text x="0ch" y="2.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">1c </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">size</tspan><tspan>: </tspan><tspan class="fa6">28 </tspan><tspan>0xd65-0xd69 (4)</tspan></text>
<text x="0ch" y="3.5em"><tspan class="fa3">0xd60</tspan><tspan>│ 65 6c 73 74 │ elst │ </tspan><tspan class="fa12">type</tspan><tspan>: </tspan><tspan class="fa2">&#34;elst&#34; </tspan><tspan>(An edit list) 0xd69-0xd6d (4)</tspan></text>
<text x="0ch" y="4.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan><tspan class="fa12">version</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xd6d-0xd6e (1)</tspan></text>
<text x="0ch" y="5.5em"><tspan class="fa3">0xd60</tspan><tspan></tspan><tspan class="fa8">00 00</tspan><tspan></tspan><tspan class="fa8">..</tspan><tspan></tspan><tspan class="fa12">flags</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xd6e-0xd71 (3)</tspan></text>
<text x="0ch" y="6.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
<text x="0ch" y="7.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan class="bold">01 </tspan><tspan></tspan><tspan class="fa8">...</tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">entry_count</tspan><tspan>: </tspan><tspan class="fa6">1 </tspan><tspan>0xd71-0xd75 (4)</tspan></text>
<text x="0ch" y="8.5em"><tspan> │ │ │ </tspan><tspan class="fa12">entries</tspan><tspan>[</tspan><tspan class="fa6">0</tspan><tspan>:</tspan><tspan class="fa6">1</tspan><tspan>]: 0xd75-0xd81 (12)</tspan></text>
<text x="0ch" y="9.5em"><tspan> │ │ │ [</tspan><tspan class="fa6">0</tspan><tspan>]{}: entry 0xd75-0xd81 (12)</tspan></text>
<text x="0ch" y="10.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 </tspan><tspan>28 │ </tspan><tspan class="fa8">...</tspan><tspan>( │ </tspan><tspan class="fa12">segment_duration</tspan><tspan>: </tspan><tspan class="fa6">40 </tspan><tspan>0xd75-0xd79 (4)</tspan></text>
<text x="0ch" y="11.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 00 00 00 </tspan><tspan></tspan><tspan class="fa8">.... </tspan><tspan></tspan><tspan class="fa12">media_time</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xd79-0xd7d (4)</tspan></text>
<text x="0ch" y="12.5em"><tspan class="fa3">0xd70</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan class="bold">01 </tspan><tspan class="fa8">00</tspan><tspan></tspan><tspan class="fa8">.</tspan><tspan class="bold">.</tspan><tspan class="fa8">.</tspan><tspan></tspan><tspan class="fa12">media_rate</tspan><tspan>: </tspan><tspan class="fa6">1 </tspan><tspan>0xd7d-0xd81 (4)</tspan></text>
<text x="0ch" y="13.5em"><tspan class="fa3">0xd80</tspan><tspan></tspan><tspan class="fa8">00 </tspan><tspan></tspan><tspan class="fa8">. </tspan><tspan></tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -26,22 +26,20 @@
.fa12 { fill: #5555ff; }
</style>
<rect width="100%" height="100%" x="0" y="0" style="fill: #000000"/>
<g x="0">
<text y="0.5em"><tspan>$ fq &#39;.frames[1].header | dv&#39; file.mp3</tspan></text>
<text y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">frames</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">header</tspan><tspan>{}: 0xb79-0xb7d (4)</tspan></text>
<text y="2.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">ff fb </tspan><tspan></tspan><tspan class="bold">.. </tspan><tspan></tspan><tspan class="fa12">sync</tspan><tspan>: </tspan><tspan class="fa6">0b11111111111 </tspan><tspan>(valid) 0xb79-0xb7a.3 (1.3)</tspan></text>
<text y="3.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">fb </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">mpeg_version</tspan><tspan>: </tspan><tspan class="fa2">&#34;1&#34; </tspan><tspan>(</tspan><tspan class="fa6">3</tspan><tspan>) (MPEG Version 1) 0xb7a.3-0xb7a.5 (0.2)</tspan></text>
<text y="4.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">fb </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">layer</tspan><tspan>: </tspan><tspan class="fa6">3 </tspan><tspan>(</tspan><tspan class="fa6">1</tspan><tspan>) (MPEG Layer 3) 0xb7a.5-0xb7a.7 (0.2)</tspan></text>
<text y="5.5em"><tspan> │ │ │ </tspan><tspan class="fa12">sample_count</tspan><tspan>: </tspan><tspan class="fa6">1152</tspan></text>
<text y="6.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">fb </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">protection_absent</tspan><tspan>: </tspan><tspan class="fa3">true </tspan><tspan>(No CRC) 0xb7a.7-0xb7b (0.1)</tspan></text>
<text y="7.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">bitrate</tspan><tspan>: </tspan><tspan class="fa6">64000 </tspan><tspan>(</tspan><tspan class="fa6">5</tspan><tspan>) 0xb7b-0xb7b.4 (0.4)</tspan></text>
<text y="8.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">sample_rate</tspan><tspan>: </tspan><tspan class="fa6">44100 </tspan><tspan>(</tspan><tspan class="fa6">0</tspan><tspan>) 0xb7b.4-0xb7b.6 (0.2)</tspan></text>
<text y="9.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">padding</tspan><tspan>: </tspan><tspan class="fa2">&#34;not_padded&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b0</tspan><tspan>) 0xb7b.6-0xb7b.7 (0.1)</tspan></text>
<text y="10.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">private</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xb7b.7-0xb7c (0.1)</tspan></text>
<text y="11.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">channels</tspan><tspan>: </tspan><tspan class="fa2">&#34;mono&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b11</tspan><tspan>) 0xb7c-0xb7c.2 (0.2)</tspan></text>
<text y="12.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">channel_mode</tspan><tspan>: </tspan><tspan class="fa2">&#34;none&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b0</tspan><tspan>) 0xb7c.2-0xb7c.4 (0.2)</tspan></text>
<text y="13.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">copyright</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xb7c.4-0xb7c.5 (0.1)</tspan></text>
<text y="14.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">original</tspan><tspan>: </tspan><tspan class="fa6">1 </tspan><tspan>0xb7c.5-0xb7c.6 (0.1)</tspan></text>
<text y="15.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">emphasis</tspan><tspan>: </tspan><tspan class="fa2">&#34;none&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b0</tspan><tspan>) 0xb7c.6-0xb7d (0.2)</tspan></text>
</g>
<text x="0ch" y="0.5em"><tspan>$ fq &#39;.frames[1].header | dv&#39; file.mp3</tspan></text>
<text x="0ch" y="1.5em"><tspan></tspan><tspan class="underline fa3">00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f</tspan><tspan></tspan><tspan class="underline fa3">0123456789abcdef</tspan><tspan>│.</tspan><tspan class="fa12">frames</tspan><tspan>[</tspan><tspan class="fa6">1</tspan><tspan>].</tspan><tspan class="fa12">header</tspan><tspan>{}: 0xb79-0xb7d (4)</tspan></text>
<text x="0ch" y="2.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">ff fb </tspan><tspan></tspan><tspan class="bold">.. </tspan><tspan></tspan><tspan class="fa12">sync</tspan><tspan>: </tspan><tspan class="fa6">0b11111111111 </tspan><tspan>(valid) 0xb79-0xb7a.3 (1.3)</tspan></text>
<text x="0ch" y="3.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">fb </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">mpeg_version</tspan><tspan>: </tspan><tspan class="fa2">&#34;1&#34; </tspan><tspan>(</tspan><tspan class="fa6">3</tspan><tspan>) (MPEG Version 1) 0xb7a.3-0xb7a.5 (0.2)</tspan></text>
<text x="0ch" y="4.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">fb </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">layer</tspan><tspan>: </tspan><tspan class="fa6">3 </tspan><tspan>(</tspan><tspan class="fa6">1</tspan><tspan>) (MPEG Layer 3) 0xb7a.5-0xb7a.7 (0.2)</tspan></text>
<text x="0ch" y="5.5em"><tspan> │ │ │ </tspan><tspan class="fa12">sample_count</tspan><tspan>: </tspan><tspan class="fa6">1152</tspan></text>
<text x="0ch" y="6.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">fb </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">protection_absent</tspan><tspan>: </tspan><tspan class="fa3">true </tspan><tspan>(No CRC) 0xb7a.7-0xb7b (0.1)</tspan></text>
<text x="0ch" y="7.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">bitrate</tspan><tspan>: </tspan><tspan class="fa6">64000 </tspan><tspan>(</tspan><tspan class="fa6">5</tspan><tspan>) 0xb7b-0xb7b.4 (0.4)</tspan></text>
<text x="0ch" y="8.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">sample_rate</tspan><tspan>: </tspan><tspan class="fa6">44100 </tspan><tspan>(</tspan><tspan class="fa6">0</tspan><tspan>) 0xb7b.4-0xb7b.6 (0.2)</tspan></text>
<text x="0ch" y="9.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">padding</tspan><tspan>: </tspan><tspan class="fa2">&#34;not_padded&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b0</tspan><tspan>) 0xb7b.6-0xb7b.7 (0.1)</tspan></text>
<text x="0ch" y="10.5em"><tspan class="fa3">0xb70</tspan><tspan>│ 50 │ P │ </tspan><tspan class="fa12">private</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xb7b.7-0xb7c (0.1)</tspan></text>
<text x="0ch" y="11.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">channels</tspan><tspan>: </tspan><tspan class="fa2">&#34;mono&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b11</tspan><tspan>) 0xb7c-0xb7c.2 (0.2)</tspan></text>
<text x="0ch" y="12.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">channel_mode</tspan><tspan>: </tspan><tspan class="fa2">&#34;none&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b0</tspan><tspan>) 0xb7c.2-0xb7c.4 (0.2)</tspan></text>
<text x="0ch" y="13.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">copyright</tspan><tspan>: </tspan><tspan class="fa6">0 </tspan><tspan>0xb7c.4-0xb7c.5 (0.1)</tspan></text>
<text x="0ch" y="14.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">original</tspan><tspan>: </tspan><tspan class="fa6">1 </tspan><tspan>0xb7c.5-0xb7c.6 (0.1)</tspan></text>
<text x="0ch" y="15.5em"><tspan class="fa3">0xb70</tspan><tspan></tspan><tspan class="bold">c4 </tspan><tspan></tspan><tspan class="bold">. </tspan><tspan></tspan><tspan class="fa12">emphasis</tspan><tspan>: </tspan><tspan class="fa2">&#34;none&#34; </tspan><tspan>(</tspan><tspan class="fa6">0b0</tspan><tspan>) 0xb7c.6-0xb7d (0.2)</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -17,10 +17,8 @@
.fa2 { fill: #00bb00; }
</style>
<rect width="100%" height="100%" x="0" y="0" style="fill: #000000"/>
<g x="0">
<text y="0.5em"><tspan>$ fq -n &#39;&#34;hello&#34;&#39;</tspan></text>
<text y="1.5em"><tspan class="fa2">&#34;hello&#34;</tspan></text>
<text y="3.5em"><tspan>$ fq -n &#39;&#34;hello&#34; | d&#39;</tspan></text>
<text y="4.5em"><tspan class="fa2">&#34;hello&#34;</tspan></text>
</g>
<text x="0ch" y="0.5em"><tspan>$ fq -n &#39;&#34;hello&#34;&#39;</tspan></text>
<text x="0ch" y="1.5em"><tspan class="fa2">&#34;hello&#34;</tspan></text>
<text x="0ch" y="3.5em"><tspan>$ fq -n &#39;&#34;hello&#34; | d&#39;</tspan></text>
<text x="0ch" y="4.5em"><tspan class="fa2">&#34;hello&#34;</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 946 B

View File

@ -70,6 +70,7 @@
|`id3v2` |ID3v2&nbsp;metadata |<sub>`image`</sub>|
|`ipv4_packet` |Internet&nbsp;protocol&nbsp;v4&nbsp;packet |<sub>`ip_packet`</sub>|
|`ipv6_packet` |Internet&nbsp;protocol&nbsp;v6&nbsp;packet |<sub>`ip_packet`</sub>|
|`jp2c` |JPEG&nbsp;2000&nbsp;codestream |<sub></sub>|
|`jpeg` |Joint&nbsp;Photographic&nbsp;Experts&nbsp;Group&nbsp;file |<sub>`exif` `icc_profile`</sub>|
|`json` |JavaScript&nbsp;Object&nbsp;Notation |<sub></sub>|
|`jsonl` |JavaScript&nbsp;Object&nbsp;Notation&nbsp;Lines |<sub></sub>|
@ -86,7 +87,7 @@
|`mp3_frame` |MPEG&nbsp;audio&nbsp;layer&nbsp;3&nbsp;frame |<sub>`mp3_frame_tags`</sub>|
|`mp3_frame_vbri` |MP3&nbsp;frame&nbsp;Fraunhofer&nbsp;encoder&nbsp;variable&nbsp;bitrate&nbsp;tag |<sub></sub>|
|`mp3_frame_xing` |MP3&nbsp;frame&nbsp;Xing/Info&nbsp;tag |<sub></sub>|
|[`mp4`](#mp4) |ISOBMFF,&nbsp;QuickTime&nbsp;and&nbsp;similar |<sub>`aac_frame` `av1_ccr` `av1_frame` `avc_au` `avc_dcr` `flac_frame` `flac_metadatablocks` `hevc_au` `hevc_dcr` `icc_profile` `id3v2` `image` `jpeg` `mp3_frame` `mpeg_es` `mpeg_pes_packet` `opus_packet` `png` `prores_frame` `protobuf_widevine` `pssh_playready` `vorbis_packet` `vp9_frame` `vpx_ccr`</sub>|
|[`mp4`](#mp4) |ISOBMFF,&nbsp;QuickTime&nbsp;and&nbsp;similar |<sub>`aac_frame` `av1_ccr` `av1_frame` `avc_au` `avc_dcr` `flac_frame` `flac_metadatablocks` `hevc_au` `hevc_dcr` `icc_profile` `id3v2` `image` `jp2c` `jpeg` `mp3_frame` `mpeg_es` `mpeg_pes_packet` `opus_packet` `png` `prores_frame` `protobuf_widevine` `pssh_playready` `vorbis_packet` `vp9_frame` `vpx_ccr`</sub>|
|`mpeg_asc` |MPEG-4&nbsp;Audio&nbsp;Specific&nbsp;Config |<sub></sub>|
|`mpeg_es` |MPEG&nbsp;Elementary&nbsp;Stream |<sub>`mpeg_asc` `vorbis_packet`</sub>|
|`mpeg_pes` |MPEG&nbsp;Packetized&nbsp;elementary&nbsp;stream |<sub>`mpeg_pes_packet` `mpeg_spu`</sub>|
@ -94,6 +95,7 @@
|`mpeg_spu` |Sub&nbsp;Picture&nbsp;Unit&nbsp;(DVD&nbsp;subtitle) |<sub></sub>|
|`mpeg_ts` |MPEG&nbsp;Transport&nbsp;Stream |<sub></sub>|
|[`msgpack`](#msgpack) |MessagePack |<sub></sub>|
|[`nes`](#nes) |iNES/NES&nbsp;2.0&nbsp;cartridge&nbsp;ROM&nbsp;format |<sub></sub>|
|`ogg` |OGG&nbsp;file |<sub>`ogg_page` `vorbis_packet` `opus_packet` `flac_metadatablock` `flac_frame`</sub>|
|`ogg_page` |OGG&nbsp;page |<sub></sub>|
|[`opentimestamps`](#opentimestamps) |OpenTimestamps&nbsp;file |<sub></sub>|
@ -130,12 +132,12 @@
|[`xml`](#xml) |Extensible&nbsp;Markup&nbsp;Language |<sub></sub>|
|`yaml` |YAML&nbsp;Ain't&nbsp;Markup&nbsp;Language |<sub></sub>|
|[`zip`](#zip) |ZIP&nbsp;archive |<sub>`probe`</sub>|
|`image` |Group |<sub>`gif` `jpeg` `mp4` `png` `tiff` `webp`</sub>|
|`image` |Group |<sub>`gif` `jp2c` `jpeg` `mp4` `png` `tiff` `webp`</sub>|
|`inet_packet` |Group |<sub>`ipv4_packet` `ipv6_packet`</sub>|
|`ip_packet` |Group |<sub>`icmp` `icmpv6` `tcp_segment` `udp_datagram`</sub>|
|`link_frame` |Group |<sub>`bsd_loopback_frame` `ether8023_frame` `ipv4_packet` `ipv6_packet` `sll2_packet` `sll_packet`</sub>|
|`mp3_frame_tags` |Group |<sub>`mp3_frame_vbri` `mp3_frame_xing`</sub>|
|`probe` |Group |<sub>`adts` `aiff` `apple_bookmark` `ar` `avi` `avro_ocf` `bitcoin_blkdat` `bplist` `bzip2` `caff` `elf` `fit` `flac` `gif` `gzip` `html` `jpeg` `json` `jsonl` `leveldb_table` `luajit` `macho` `macho_fat` `matroska` `moc3` `mp3` `mp4` `mpeg_ts` `ogg` `opentimestamps` `pcap` `pcapng` `png` `tar` `tiff` `toml` `tzif` `wasm` `wav` `webp` `xml` `yaml` `zip`</sub>|
|`probe` |Group |<sub>`adts` `aiff` `apple_bookmark` `ar` `avi` `avro_ocf` `bitcoin_blkdat` `bplist` `bzip2` `caff` `elf` `fit` `flac` `gif` `gzip` `html` `jp2c` `jpeg` `json` `jsonl` `leveldb_table` `luajit` `macho` `macho_fat` `matroska` `moc3` `mp3` `mp4` `mpeg_ts` `nes` `ogg` `opentimestamps` `pcap` `pcapng` `png` `tar` `tiff` `toml` `tzif` `wasm` `wav` `webp` `xml` `yaml` `zip`</sub>|
|`tcp_stream` |Group |<sub>`dns_tcp` `rtmp` `tls`</sub>|
|`udp_payload` |Group |<sub>`dns`</sub>|
@ -940,6 +942,42 @@ $ fq -d msgpack torepr file.msgpack
### References
- https://github.com/msgpack/msgpack/blob/master/spec.md
## nes
### Limitations
- `prg_rom`, `chr_rom` and `trainer` fields may contain data that is just random
junk from the memory chips, since they are of a fixed size.
- The `nes_toasm` function outputs ALL opcodes, including the unofficial ones,
which means that none of the regular assemblers can recompile it.
- The `nes_tokitty` function works on tiles in `chr_rom` but only outputs a Kitty
graphics compatible string. You need to manually `printf` that string to get
Kitty (or another compatible terminal) to output the graphics.
### Decompile PRG ROM
```
$ fq -r '.prg_rom[] | nes_toasm' file.nes
```
### Print out first CHR ROM tile in Kitty (or Konsole, wayst, WezTerm) at size 5
```
$ printf $(fq -r -d nes '.chr_rom[0] | nes_tokitty(5)' file.nes)
```
### Print out all CHR ROM tiles in Kitty (with Bash) at size 5
```
$ for line in $(fq -r '.chr_rom[] | nes_tokitty(5)' file.nes);do printf "%b%s" "$line";done
```
### Authors
- Mikael Lofjärd mikael.lofjard@gmail.com, original author
### References
- https://www.nesdev.org/wiki/INES
- https://www.nesdev.org/wiki/NES_2.0
- https://www.nesdev.org/wiki/CPU
- https://bugzmanov.github.io/nes_ebook/chapter_6_3.html
## opentimestamps
### View a full OpenTimestamps file

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

@ -1,3 +1,9 @@
//go:build exclude
package bts2022
import "github.com/wader/fq/pkg/decode"
func avcHdrParameters(d *decode.D) {
cpbCnt := d.FieldUintFn("cpb_cnt", uEV, scalar.UAdd(1))
d.FieldU4("bit_rate_scale")
@ -15,4 +21,4 @@ func avcHdrParameters(d *decode.D) {
d.FieldU5("cpb_removal_delay_length", scalar.UAdd(1))
d.FieldU5("dpb_output_delay_length", scalar.UAdd(1))
d.FieldU5("time_offset_length")
}
}

View File

@ -1,3 +1,7 @@
//go:build exclude
package bts2022
func decode(d *decode.D) any {
d.FieldArray("headers", func(d *decode.D) {
for !d.End() {

View File

@ -168,9 +168,9 @@ Here the `sync` pattern starts at `0xb79` (bit `0`) and ends at `0xb7a.3` (exclu
There are also some other `display` aliases:
- `da` is `display({array_truncate: 0})` don't truncate arrays.
- `dd` is `display({array_truncate: 0, display_bytes: 0})` don't truncate arrays and raw bytes.
- `dv` is `display({array_truncate: 0, verbose: true})` don't truncate arrays and display verbosely.
- `ddv` is `display({array_truncate: 0, display_bytes: 0 verbose: true})` don't truncate arrays and raw bytes. and display verbosely.
- `dd` is `display({array_truncate: 0, string_truncate: 0, display_bytes: 0})` don't truncate arrays and raw bytes.
- `dv` is `display({array_truncate: 0, string_truncate: 0, verbose: true})` don't truncate arrays and display verbosely.
- `ddv` is `display({array_truncate: 0, string_truncate: 0, display_bytes: 0 verbose: true})` don't truncate arrays and raw bytes. and display verbosely.
## Interactive REPL
@ -844,6 +844,15 @@ In query
tovalue({skip_gaps: true})
```
### `-o array_truncate=<number>`
By default truncate long array when displaying decode value tree. Use `dd` or `d({array_truncate: 0})` to not truncate.
### `-o string_truncate=<number>`
By default truncate long strings when displaying decode value tree. Use `dd` or `d({string_truncate: 0})` to not truncate.
## Color and unicode output
fq by default tries to use colors if possible, this can be disabled with `-M`. You can also

View File

@ -14,6 +14,7 @@ $ fq -n _registry.groups.probe
"flac",
"gif",
"gzip",
"jp2c",
"jpeg",
"leveldb_table",
"luajit",
@ -22,6 +23,7 @@ $ fq -n _registry.groups.probe
"matroska",
"moc3",
"mp4",
"nes",
"ogg",
"opentimestamps",
"pcap",
@ -111,6 +113,7 @@ id3v11 ID3v1.1 metadata
id3v2 ID3v2 metadata
ipv4_packet Internet protocol v4 packet
ipv6_packet Internet protocol v6 packet
jp2c JPEG 2000 codestream
jpeg Joint Photographic Experts Group file
json JavaScript Object Notation
jsonl JavaScript Object Notation Lines
@ -135,6 +138,7 @@ mpeg_pes_packet MPEG Packetized elementary stream packet
mpeg_spu Sub Picture Unit (DVD subtitle)
mpeg_ts MPEG Transport Stream
msgpack MessagePack
nes iNES/NES 2.0 cartridge ROM format
ogg OGG file
ogg_page OGG page
opentimestamps OpenTimestamps file

View File

@ -41,6 +41,7 @@ import (
_ "github.com/wader/fq/format/mp4"
_ "github.com/wader/fq/format/mpeg"
_ "github.com/wader/fq/format/msgpack"
_ "github.com/wader/fq/format/nes"
_ "github.com/wader/fq/format/ogg"
_ "github.com/wader/fq/format/opentimestamps"
_ "github.com/wader/fq/format/opus"

View File

@ -80,7 +80,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | [4]{}: entry 0xf-0x264 (597)
@ -492,7 +492,7 @@ $ fq dv Info.plist
0x410| 10 | . | exponent: 0 0x41a.4-0x41b (0.4)
0x410| 33 | 3 | size_bigint: 51 0x41b-0x41c (1)
| | | size: 51
0x410| 63 6f 6d 2e| com.| value: "com.apple.videotoolbox.videodecoder.prores.embe..." 0x41c-0x44f (51)
0x410| 63 6f 6d 2e| com.| value: "com.apple.videotoolbox.videodecoder.prores.embedded" 0x41c-0x44f (51)
0x420|61 70 70 6c 65 2e 76 69 64 65 6f 74 6f 6f 6c 62|apple.videotoolb|
* |until 0x44e.7 (51) | |
| | | [5]{}: entry 0x313-0x45f (332)
@ -533,7 +533,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
0x310| 33 | 3 | key_index: 51 0x314-0x315 (1)
@ -735,7 +735,7 @@ $ fq dv Info.plist
0x540| 10| .| exponent: 0 0x54f.4-0x550 (0.4)
0x550|3a |: | size_bigint: 58 0x550-0x551 (1)
| | | size: 58
0x550| 63 6f 6d 2e 61 70 70 6c 65 2e 76 69 64 65 6f| com.apple.video| value: "com.apple.videotoolbox.videoencoder.prores-4444..." 0x551-0x58b (58)
0x550| 63 6f 6d 2e 61 70 70 6c 65 2e 76 69 64 65 6f| com.apple.video| value: "com.apple.videotoolbox.videoencoder.prores-4444xq.embedded" 0x551-0x58b (58)
0x560|74 6f 6f 6c 62 6f 78 2e 76 69 64 65 6f 65 6e 63|toolbox.videoenc|
* |until 0x58a.7 (58) | |
| | | [5]{}: entry 0x4cc-0x54e (130)
@ -810,7 +810,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | key{}: 0x3b4-0x3c0 (12)
@ -975,7 +975,7 @@ $ fq dv Info.plist
0x600| 10 | . | exponent: 0 0x601.4-0x602 (0.4)
0x600| 38 | 8 | size_bigint: 56 0x602-0x603 (1)
| | | size: 56
0x600| 63 6f 6d 2e 61 70 70 6c 65 2e 76 69 64| com.apple.vid| value: "com.apple.videotoolbox.videoencoder.prores-4444..." 0x603-0x63b (56)
0x600| 63 6f 6d 2e 61 70 70 6c 65 2e 76 69 64| com.apple.vid| value: "com.apple.videotoolbox.videoencoder.prores-4444.embedded" 0x603-0x63b (56)
0x610|65 6f 74 6f 6f 6c 62 6f 78 2e 76 69 64 65 6f 65|eotoolbox.videoe|
* |until 0x63a.7 (56) | |
| | | [5]{}: entry 0x4e9-0x600 (279)
@ -1050,7 +1050,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | key{}: 0x3b4-0x3c0 (12)
@ -1216,7 +1216,7 @@ $ fq dv Info.plist
0x680| 10| .| exponent: 0 0x68f.4-0x690 (0.4)
0x690|39 |9 | size_bigint: 57 0x690-0x691 (1)
| | | size: 57
0x690| 63 6f 6d 2e 61 70 70 6c 65 2e 76 69 64 65 6f| com.apple.video| value: "com.apple.videotoolbox.videoencoder.prores-422h..." 0x691-0x6ca (57)
0x690| 63 6f 6d 2e 61 70 70 6c 65 2e 76 69 64 65 6f| com.apple.video| value: "com.apple.videotoolbox.videoencoder.prores-422hq.embedded" 0x691-0x6ca (57)
0x6a0|74 6f 6f 6c 62 6f 78 2e 76 69 64 65 6f 65 6e 63|toolbox.videoenc|
* |until 0x6c9.7 (57) | |
| | | [5]{}: entry 0x4e9-0x68e (421)
@ -1291,7 +1291,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | key{}: 0x3b4-0x3c0 (12)
@ -1457,7 +1457,7 @@ $ fq dv Info.plist
0x710| 10 | . | exponent: 0 0x718.4-0x719 (0.4)
0x710| 37 | 7 | size_bigint: 55 0x719-0x71a (1)
| | | size: 55
0x710| 63 6f 6d 2e 61 70| com.ap| value: "com.apple.videotoolbox.videoencoder.prores-422...." 0x71a-0x751 (55)
0x710| 63 6f 6d 2e 61 70| com.ap| value: "com.apple.videotoolbox.videoencoder.prores-422.embedded" 0x71a-0x751 (55)
0x720|70 6c 65 2e 76 69 64 65 6f 74 6f 6f 6c 62 6f 78|ple.videotoolbox|
* |until 0x750.7 (55) | |
| | | [5]{}: entry 0x4e9-0x717 (558)
@ -1532,7 +1532,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | key{}: 0x3b4-0x3c0 (12)
@ -1697,7 +1697,7 @@ $ fq dv Info.plist
0x7a0| 10 | . | exponent: 0 0x7a5.4-0x7a6 (0.4)
0x7a0| 39 | 9 | size_bigint: 57 0x7a6-0x7a7 (1)
| | | size: 57
0x7a0| 63 6f 6d 2e 61 70 70 6c 65| com.apple| value: "com.apple.videotoolbox.videoencoder.prores-422l..." 0x7a7-0x7e0 (57)
0x7a0| 63 6f 6d 2e 61 70 70 6c 65| com.apple| value: "com.apple.videotoolbox.videoencoder.prores-422lt.embedded" 0x7a7-0x7e0 (57)
0x7b0|2e 76 69 64 65 6f 74 6f 6f 6c 62 6f 78 2e 76 69|.videotoolbox.vi|
* |until 0x7df.7 (57) | |
| | | [5]{}: entry 0x4e9-0x7a4 (699)
@ -1772,7 +1772,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | key{}: 0x3b4-0x3c0 (12)
@ -1937,7 +1937,7 @@ $ fq dv Info.plist
0x830| 10 | . | exponent: 0 0x83a.4-0x83b (0.4)
0x830| 3c | < | size_bigint: 60 0x83b-0x83c (1)
| | | size: 60
0x830| 63 6f 6d 2e| com.| value: "com.apple.videotoolbox.videoencoder.prores-422p..." 0x83c-0x878 (60)
0x830| 63 6f 6d 2e| com.| value: "com.apple.videotoolbox.videoencoder.prores-422proxy.embedded" 0x83c-0x878 (60)
0x840|61 70 70 6c 65 2e 76 69 64 65 6f 74 6f 6f 6c 62|apple.videotoolb|
* |until 0x877.7 (60) | |
| | | [5]{}: entry 0x4e9-0x839 (848)
@ -2012,7 +2012,7 @@ $ fq dv Info.plist
0x220| 10 | . | exponent: 0 0x224.4-0x225 (0.4)
0x220| 37 | 7 | size_bigint: 55 0x225-0x226 (1)
| | | size: 55
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights r..." 0x226-0x25d (55)
0x220| 43 6f 70 79 72 69 67 68 74 20| Copyright | value: "Copyright (c) 2011-2021 Apple Inc. All rights reserved." 0x226-0x25d (55)
0x230|28 63 29 20 32 30 31 31 2d 32 30 32 31 20 41 70|(c) 2011-2021 Ap|
* |until 0x25c.7 (55) | |
| | | key{}: 0x3b4-0x3c0 (12)

View File

@ -281,7 +281,7 @@ func decodeASN1BERValue(d *decode.D, bib *bitio.Buffer, sb *strings.Builder, par
if bib != nil {
// TODO: helper?
if _, err := bitio.Copy(bib, br); err != nil {
d.IOPanic(err, "bitio.Copy")
d.IOPanic(err, "value", "bitio.Copy")
}
}
if unusedBitsCount > 0 {
@ -292,7 +292,7 @@ func decodeASN1BERValue(d *decode.D, bib *bitio.Buffer, sb *strings.Builder, par
if bib != nil {
// TODO: helper?
if _, err := bitio.Copy(bib, br); err != nil {
d.IOPanic(err, "bitio.Copy")
d.IOPanic(err, "value", "bitio.Copy")
}
}
case class == classUniversal && tag == universalTypeNull:

View File

@ -14,7 +14,7 @@ $ fq dv allDataTypes.avro
0x010|61 |a |
| | | value{}: 0x11-0x3fd (1004)
0x010| d4 0f | .. | length: 1002 0x11-0x13 (2)
0x010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name..." 0x13-0x3fd (1002)
0x010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name\":\"boolean\",\"type\":\"boolean\"},{\"name\":\"int\",\"type\":\"int\"},{\"name\":\"long\",\"type\":\"long\"},{\"name\":\"float\",\"type\":\"float\"},{\"name\":\"double\",\"type\":\"double\"},{\"name\":\"bytes\",\"type\":\"bytes\"},{\"name\":\"string\",\"type\":\"string\"},{\"name\":\"enum\",\"type\":{\"name\":\"enum\",\"symbols\":[\"A\",\"B\",\"C\"],\"type\":\"enum\"}},{\"name\":\"array\",\"type\":{\"items\":\"string\",\"name\":\"array\",\"type\":\"array\"}},{\"name\":\"map\",\"type\":{\"name\":\"map\",\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"union\",\"type\":[\"int\",\"string\"]},{\"name\":\"fixed\",\"type\":{\"name\":\"fixed\",\"size\":16,\"type\":\"fixed\"}},{\"name\":\"date\",\"type\":{\"logicalType\":\"date\",\"type\":\"int\"}},{\"name\":\"timeMillis\",\"type\":{\"logicalType\":\"time-millis\",\"type\":\"long\"}},{\"name\":\"timeMicros\",\"type\":{\"logicalType\":\"time-micros\",\"type\":\"long\"}},{\"name\":\"timestampMillis\",\"type\":{\"logicalType\":\"timestamp-millis\",\"type\":\"long\"}},{\"name\":\"timestampMicros\",\"type\":{\"logicalType\":\"timestamp-micros\",\"type\":\"long\"}}],\"name\":\"AllDataTypes\",\"type\":\"record\"}" 0x13-0x3fd (1002)
0x020|6e 61 6d 65 22 3a 22 6e 75 6c 6c 22 2c 22 74 79|name":"null","ty|
* |until 0x3fc.7 (1002) | |
| | | [1]{}: entry 0x3fd-0x40d (16)

View File

@ -21,7 +21,7 @@ $ fq 'dv({array_truncate: 5})' quickstop-deflate.avro
0x000020|68 65 6d 61 |hema |
| | | value{}: 0x24-0x119 (245)
0x000020| e6 03 | .. | length: 243 0x24-0x26 (2)
0x000020| 7b 22 74 79 70 65 22 3a 22 72| {"type":"r| data: "{\"type\":\"record\",\"name\":\"Person\",\"fields\":[{\"na..." 0x26-0x119 (243)
0x000020| 7b 22 74 79 70 65 22 3a 22 72| {"type":"r| data: "{\"type\":\"record\",\"name\":\"Person\",\"fields\":[{\"name\":\"ID\",\"type\":{\"type\":\"long\"}},{\"name\":\"First\",\"type\":{\"type\":\"string\"}},{\"name\":\"Last\",\"type\":{\"type\":\"string\"}},{\"name\":\"Phone\",\"type\":{\"type\":\"string\"}},{\"name\":\"Age\",\"type\":{\"type\":\"int\"}}]}" 0x26-0x119 (243)
0x000030|65 63 6f 72 64 22 2c 22 6e 61 6d 65 22 3a 22 50|ecord","name":"P|
* |until 0x118.7 (243) | |
| | | [1]{}: block 0x119-0x11a (1)

View File

@ -14,7 +14,7 @@ $ fq 'dv({array_truncate: 25})' snappy.avro
0x00010|61 |a |
| | | value{}: 0x11-0x3fd (1004)
0x00010| d4 0f | .. | length: 1002 0x11-0x13 (2)
0x00010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name..." 0x13-0x3fd (1002)
0x00010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name\":\"boolean\",\"type\":\"boolean\"},{\"name\":\"int\",\"type\":\"int\"},{\"name\":\"long\",\"type\":\"long\"},{\"name\":\"float\",\"type\":\"float\"},{\"name\":\"double\",\"type\":\"double\"},{\"name\":\"bytes\",\"type\":\"bytes\"},{\"name\":\"string\",\"type\":\"string\"},{\"name\":\"enum\",\"type\":{\"name\":\"enum\",\"symbols\":[\"A\",\"B\",\"C\"],\"type\":\"enum\"}},{\"name\":\"array\",\"type\":{\"items\":\"string\",\"name\":\"array\",\"type\":\"array\"}},{\"name\":\"map\",\"type\":{\"name\":\"map\",\"type\":\"map\",\"values\":\"string\"}},{\"name\":\"union\",\"type\":[\"int\",\"string\"]},{\"name\":\"fixed\",\"type\":{\"name\":\"fixed\",\"size\":16,\"type\":\"fixed\"}},{\"name\":\"date\",\"type\":{\"logicalType\":\"date\",\"type\":\"int\"}},{\"name\":\"timeMillis\",\"type\":{\"logicalType\":\"time-millis\",\"type\":\"long\"}},{\"name\":\"timeMicros\",\"type\":{\"logicalType\":\"time-micros\",\"type\":\"long\"}},{\"name\":\"timestampMillis\",\"type\":{\"logicalType\":\"timestamp-millis\",\"type\":\"long\"}},{\"name\":\"timestampMicros\",\"type\":{\"logicalType\":\"timestamp-micros\",\"type\":\"long\"}}],\"name\":\"AllDataTypes\",\"type\":\"record\"}" 0x13-0x3fd (1002)
0x00020|6e 61 6d 65 22 3a 22 6e 75 6c 6c 22 2c 22 74 79|name":"null","ty|
* |until 0x3fc.7 (1002) | |
| | | [1]{}: entry 0x3fd-0x40f (18)

View File

@ -14,7 +14,7 @@ $ fq dv twitter.avro
0x010|61 |a |
| | | value{}: 0x11-0x187 (374)
0x010| e8 05 | .. | length: 372 0x11-0x13 (2)
0x010| 7b 22 74 79 70 65 22 3a 22 72 65 63 6f| {"type":"reco| data: "{\"type\":\"record\",\"name\":\"twitter_schema\",\"names..." 0x13-0x187 (372)
0x010| 7b 22 74 79 70 65 22 3a 22 72 65 63 6f| {"type":"reco| data: "{\"type\":\"record\",\"name\":\"twitter_schema\",\"namespace\":\"com.miguno.avro\",\"fields\":[{\"name\":\"username\",\"type\":\"string\",\"doc\":\"Name of the user account on Twitter.com\"},{\"name\":\"tweet\",\"type\":\"string\",\"doc\":\"The content of the user's Twitter message\"},{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"Unix epoch time in seconds\"}],\"doc:\":\"A basic schema for storing Twitter messages\"}" 0x13-0x187 (372)
0x020|72 64 22 2c 22 6e 61 6d 65 22 3a 22 74 77 69 74|rd","name":"twit|
* |until 0x186.7 (372) | |
| | | [1]{}: entry 0x187-0x197 (16)

View File

@ -1,4 +1,4 @@
$ fq -d bencode dv bbb.torrent
$ fq -d bencode 'dv({string_truncate: 50})' bbb.torrent
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: bbb.torrent (bencode) 0x0-0x3796 (14230)
0x0000|64 |d | type: "dictionary" ("d") 0x0-0x1 (1)
| | | pairs[0:9]: 0x1-0x3795 (14228)
@ -181,7 +181,7 @@ $ fq -d bencode dv bbb.torrent
0x01a0| 31 33| 13| length: 13580 0x1ae-0x1b3 (5)
0x01b0|35 38 30 |580 |
0x01b0| 3a | : | separator: ":" (valid) 0x1b3-0x1b4 (1)
0x01b0| 99 71 9b 2c 2e aa b6 80 df fa 1f 36| .q.,.......6| value: "<22>q<EFBFBD>,.<2E><><EFBFBD><EFBFBD><EFBFBD>\x1f6\x0e<30>LS<4C>x<EFBFBD><78><EFBFBD>)\xef..." 0x1b4-0x36c0 (13580)
0x01b0| 99 71 9b 2c 2e aa b6 80 df fa 1f 36| .q.,.......6| value: "<22>q<EFBFBD>,.<2E><><EFBFBD><EFBFBD><EFBFBD>\x1f6\x0e<30>LS<4C>x<EFBFBD><78><EFBFBD>)<EFBFBD>><3E><><EFBFBD><EFBFBD>\x03\x19%<25>\x04\x04<30>}<7D>\v<>Ķ{\rB<72><42><EFBFBD>wT\r<>" 0x1b4-0x36c0 (13580)
0x01c0|0e e0 4c 53 f3 78 bb 84 82 29 c8 3e 98 91 93 f9|..LS.x...).>....|
* |until 0x36bf.7 (13580) | |
| | | [6]{}: pair 0x36c0-0x3701 (65)
@ -257,7 +257,7 @@ $ fq -d bencode dv bbb.torrent
0x3700| 39 | 9 | type: "string" ("9") 0x370d-0x370e (1)
0x3700| 39 30 | 90 | length: 90 0x370d-0x370f (2)
0x3700| 3a| :| separator: ":" (valid) 0x370f-0x3710 (1)
0x3710|68 74 74 70 3a 2f 2f 64 69 73 74 72 69 62 75 74|http://distribut| value: "http://distribution.bbb3d.renderfarming.net/vid..." 0x3710-0x376a (90)
0x3710|68 74 74 70 3a 2f 2f 64 69 73 74 72 69 62 75 74|http://distribut| value: "http://distribution.bbb3d.renderfarming.net/video/" 0x3710-0x376a (90)
* |until 0x3769.7 (90) | |
0x3760| 65 | e | end: "e" (valid) 0x376a-0x376b (1)
| | | [8]{}: pair 0x376b-0x3795 (42)

View File

@ -5,10 +5,10 @@ $ fq dd genesis.dat
0x000| 1d 01 00 00 | .... | size: 285
| | | header{}:
0x000| 01 00 00 00 | .... | version: 0x1
0x000| 00 00 00 00| ....| previous_block_hash: "00000000000000000000000000000000000000000000000..." (raw bits)
0x000| 00 00 00 00| ....| previous_block_hash: "0000000000000000000000000000000000000000000000000000000000000000" (raw bits)
0x010|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
0x020|00 00 00 00 00 00 00 00 00 00 00 00 |............ |
0x020| 3b a3 ed fd| ;...| merkle_root: "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77..." (raw bits)
0x020| 3b a3 ed fd| ;...| merkle_root: "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" (raw bits)
0x030|7a 7b 12 b2 7a c7 2c 3e 67 76 8f 61 7f c8 1b c3|z{..z.,>gv.a....|
0x040|88 8a 51 32 3a 9f b8 aa 4b 1e 5e 4a |..Q2:...K.^J |
0x040| 29 ab 5f 49| )._I| time: 1231006505 (2009-01-03T18:15:05Z)
@ -21,7 +21,7 @@ $ fq dd genesis.dat
0x050| 01 | . | input_count: 1
| | | inputs[0:1]:
| | | [0]{}: input
0x050| 00 00| ..| txid: "00000000000000000000000000000000000000000000000..." (raw bits) (coinbase)
0x050| 00 00| ..| txid: "0000000000000000000000000000000000000000000000000000000000000000" (raw bits) (coinbase)
0x060|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
0x070|00 00 00 00 00 00 00 00 00 00 00 00 00 00 |.............. |
0x070| ff ff| ..| vout: 4294967295

View File

@ -6,7 +6,7 @@ $ fq -d bitcoin_transaction dv tx_b941ddad.dat
0x000| 01 | . | input_count: 1 0x6-0x7 (1)
| | | inputs[0:1]: 0x7-0x30 (41)
| | | [0]{}: input 0x7-0x30 (41)
0x000| 05 89 f2 e6 c0 7d 7c d7 d0| .....}|..| txid: "1efe0f1537ddd0b2f94d93b56d14f30f570b7495cfbf6cd..." (raw bits) 0x7-0x27 (32)
0x000| 05 89 f2 e6 c0 7d 7c d7 d0| .....}|..| txid: "1efe0f1537ddd0b2f94d93b56d14f30f570b7495cfbf6cd0d77c7dc0e6f28905" (raw bits) 0x7-0x27 (32)
0x010|6c bf cf 95 74 0b 57 0f f3 14 6d b5 93 4d f9 b2|l...t.W...m..M..|
0x020|d0 dd 37 15 0f fe 1e |..7.... |
0x020| 00 00 00 00 | .... | vout: 0 0x27-0x2b (4)

View File

@ -13,7 +13,7 @@ import (
"strings"
"github.com/wader/fq/format"
"github.com/wader/fq/internal/mathex"
"github.com/wader/fq/internal/mathx"
"github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
@ -117,7 +117,7 @@ func decodeCBORValue(d *decode.D) any {
}},
majorTypeNegativeInt: {s: scalar.Uint{Sym: "negative_int"}, d: func(d *decode.D, shortCount uint64, count uint64) any {
n := new(big.Int)
n.SetUint64(count).Neg(n).Sub(n, mathex.BigIntOne)
n.SetUint64(count).Neg(n).Sub(n, mathx.BigIntOne)
d.FieldValueBigInt("value", n)
return nil
}},

View File

@ -9,7 +9,7 @@ import (
"io"
"github.com/wader/fq/format"
"github.com/wader/fq/internal/gojqex"
"github.com/wader/fq/internal/gojqx"
"github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
@ -83,11 +83,11 @@ func toCSV(_ *interp.Interp, c []any, opts ToCSVOpts) any {
w.Comma = rune(opts.Comma[0])
}
for _, row := range c {
rs, ok := gojqex.Cast[[]any](row)
rs, ok := gojqx.Cast[[]any](row)
if !ok {
return fmt.Errorf("expected row to be an array, got %s", gojqex.TypeErrorPreview(row))
return fmt.Errorf("expected row to be an array, got %s", gojqx.TypeErrorPreview(row))
}
vs, ok := gojqex.NormalizeToStrings(rs).([]any)
vs, ok := gojqx.NormalizeToStrings(rs).([]any)
if !ok {
panic("not array")
}
@ -95,7 +95,7 @@ func toCSV(_ *interp.Interp, c []any, opts ToCSVOpts) any {
for _, v := range vs {
s, ok := v.(string)
if !ok {
return fmt.Errorf("expected row record to be scalars, got %s", gojqex.TypeErrorPreview(v))
return fmt.Errorf("expected row record to be scalars, got %s", gojqx.TypeErrorPreview(v))
}
ss = append(ss, s)
}

View File

@ -470,7 +470,7 @@ $ fq -d elf dv a_dynamic
0x3d30|04 00 00 00 |.... | addralign: 4 0x3d30-0x3d34 (4)
0x3d30| 10 00 00 00 | .... | entsize: 16 0x3d34-0x3d38 (4)
| | | [5]{}: section_header 0x2c8-0x3d60 (15000)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_base..." 0x2c8-0x393 (203)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_bases\x00_ITM_registerTMCloneTable\x00__deregister_frame_info_bases\x00_ITM_deregisterTMCloneTable\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-x86.so.1\x00" 0x2c8-0x393 (203)
0x02d0|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 72|cxa_finalize.__r|
* |until 0x392.7 (203) | |
0x3d30| 48 00 00 00 | H... | name: ".dynstr" (72) 0x3d38-0x3d3c (4)
@ -1686,7 +1686,7 @@ $ fq -d elf dv a_dynamic
0x4160| 04 00 00 00 | .... | addralign: 4 0x4168-0x416c (4)
0x4160| 10 00 00 00| ....| entsize: 16 0x416c-0x4170 (4)
| | | [32]{}: section_header 0x38f0-0x4198 (2216)
0x38f0|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__..." 0x38f0-0x3b41 (593)
0x38f0|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.2\x00dtor_idx.1\x00frame_dummy\x00object.0\x00__CTOR_END__\x00__FRAME_END__\x00__do_global_ctors_aux\x00a.c\x00_DYNAMIC\x00__GNU_EH_FRAME_HDR\x00_GLOBAL_OFFSET_TABLE_\x00__x86.get_pc_thunk.di\x00__TMC_END__\x00__DTOR_END__\x00puts\x00__cxa_finalize\x00__x86.get_pc_thunk.ax\x00__dso_handle\x00aaa\x00__x86.get_pc_thunk.dx\x00_init\x00__register_frame_info_bases\x00_ITM_registerTMCloneTable\x00__deregister_frame_info_bases\x00_start_c\x00__x86.get_pc_thunk.bx\x00_ITM_deregisterTMCloneTable\x00__bss_start\x00_fini\x00_edata\x00_end\x00libbbb_bbb\x00__libc_start_main\x00" 0x38f0-0x3b41 (593)
* |until 0x3b40.7 (593) | |
0x4170|09 00 00 00 |.... | name: ".strtab" (9) 0x4170-0x4174 (4)
0x4170| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x4174-0x4178 (4)
@ -1713,7 +1713,7 @@ $ fq -d elf dv a_dynamic
0x4190|01 00 00 00 |.... | addralign: 1 0x4190-0x4194 (4)
0x4190| 00 00 00 00 | .... | entsize: 0 0x4194-0x4198 (4)
| | | [33]{}: section_header 0x3b41-0x41c0 (1663)
0x3b40| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74 61| ..symtab..strta| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.pr..." 0x3b41-0x3c6f (302)
0x3b40| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74 61| ..symtab..strta| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.plt.got\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.ctors\x00.dtors\x00.dynamic\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x3b41-0x3c6f (302)
0x3b50|62 00 2e 73 68 73 74 72 74 61 62 00 2e 69 6e 74|b..shstrtab..int|
* |until 0x3c6e.7 (302) | |
0x4190| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x4198-0x419c (4)

View File

@ -2088,7 +2088,7 @@ $ fq -d elf dv a_static
0x11700| 04 00 00 00 | .... | addralign: 4 0x11708-0x1170c (4)
0x11700| 10 00 00 00| ....| entsize: 16 0x1170c-0x11710 (4)
| | | [23]{}: section_header 0x10c40-0x11738 (2808)
0x10c40|00 63 72 74 31 2e 63 00 63 72 74 73 74 75 66 66|.crt1.c.crtstuff| string: "\x00crt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00..." 0x10c40-0x1128b (1611)
0x10c40|00 63 72 74 31 2e 63 00 63 72 74 73 74 75 66 66|.crt1.c.crtstuff| string: "\x00crt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.2\x00dtor_idx.1\x00frame_dummy\x00object.0\x00__CTOR_END__\x00__FRAME_END__\x00__do_global_ctors_aux\x00a.c\x00libbbb.c\x00__libc_start_main.c\x00dummy1\x00libc_start_main_stage2\x00libc.c\x00stdout.c\x00buf\x00__environ.c\x00__init_tls.c\x00static_init_tls\x00main_tls\x00builtin_tls\x00_Exit.c\x00__lockfile.c\x00__overflow.c\x00__stdio_close.c\x00__stdio_seek.c\x00__stdout_write.c\x00__towrite.c\x00fputs.c\x00fwrite.c\x00strlen.c\x00default_attr.c\x00lseek.c\x00syscall_ret.c\x00__stdio_exit.c\x00close_file\x00dummy_file\x00__stdio_write.c\x00ofl.c\x00ofl_head\x00__lock.c\x00__errno_location.c\x00__fini_array_end\x00__fini_array_start\x00__init_array_end\x00_GLOBAL_OFFSET_TABLE_\x00__init_array_start\x00__thread_list_lock\x00__stdout_used\x00stdout\x00__x86.get_pc_thunk.si\x00__init_libc\x00__syscall_ret\x00__stdout_write\x00__ofl_unlock\x00__unlockfile\x00__hwcap\x00__stdio_write\x00__towrite\x00memcpy\x00__ofl_lock\x00__TMC_END__\x00__unlock\x00__DTOR_END__\x00__overflow\x00__libc\x00__x86.get_pc_thunk.ax\x00__dso_handle\x00__set_thread_area\x00__stdin_used\x00__copy_tls\x00__stdio_seek\x00__lockfile\x00___errno_location\x00aaa\x00_Exit\x00__towrite_needs_stdio_exit\x00__init_tls\x00__funcs_on_exit\x00__memcpy_fwd\x00__stdio_ofl_lockptr\x00fputs_unlocked\x00___environ\x00__progname\x00_start_c\x00__stdout_FILE\x00program_invocation_short_name\x00__libc_start_init\x00__init_tp\x00__x86.get_pc_thunk.bx\x00__init_ssp\x00__fwritex\x00__x86.get_pc_thunk.bp\x00__bss_start\x00__stdio_exit\x00__lock\x00__aio_close\x00__lseek\x00__libc_exit_fini\x00fwrite_unlocked\x00fwrite\x00_edata\x00__stdio_close\x00__stderr_used\x00__stdio_exit_needed\x00libbbb_bbb\x00__libc_start_main\x00strlen\x00lseek64\x00program_invocation_name\x00__default_stacksize\x00fputs\x00__default_guardsize\x00__sysinfo\x00__progname_full\x00" 0x10c40-0x1128b (1611)
* |until 0x1128a.7 (1611) | |
0x11710|09 00 00 00 |.... | name: ".strtab" (9) 0x11710-0x11714 (4)
0x11710| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x11714-0x11718 (4)
@ -2115,7 +2115,7 @@ $ fq -d elf dv a_static
0x11730|01 00 00 00 |.... | addralign: 1 0x11730-0x11734 (4)
0x11730| 00 00 00 00 | .... | entsize: 0 0x11734-0x11738 (4)
| | | [24]{}: section_header 0x1128b-0x11760 (1237)
0x11280| 00 2e 73 79 6d| ..sym| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.note.gnu.property\x00...." 0x1128b-0x11377 (236)
0x11280| 00 2e 73 79 6d| ..sym| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.note.gnu.property\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.ctors\x00.dtors\x00.data.rel.ro\x00.got\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x1128b-0x11377 (236)
0x11290|74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 73|tab..strtab..shs|
* |until 0x11376.7 (236) | |
0x11730| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x11738-0x1173c (4)

View File

@ -470,7 +470,7 @@ $ fq -d elf dv a_stripped
0x31b0|04 00 00 00 |.... | addralign: 4 0x31b0-0x31b4 (4)
0x31b0| 10 00 00 00 | .... | entsize: 16 0x31b4-0x31b8 (4)
| | | [5]{}: section_header 0x2c8-0x31e0 (12056)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_base..." 0x2c8-0x393 (203)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_bases\x00_ITM_registerTMCloneTable\x00__deregister_frame_info_bases\x00_ITM_deregisterTMCloneTable\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-x86.so.1\x00" 0x2c8-0x393 (203)
0x02d0|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 72|cxa_finalize.__r|
* |until 0x392.7 (203) | |
0x31b0| 38 00 00 00 | 8... | name: ".dynstr" (56) 0x31b8-0x31bc (4)
@ -1024,7 +1024,7 @@ $ fq -d elf dv a_stripped
0x3480|01 00 00 00 |.... | addralign: 1 0x3480-0x3484 (4)
0x3480| 01 00 00 00 | .... | entsize: 1 0x3484-0x3488 (4)
| | | [23]{}: section_header 0x3035-0x34b0 (1147)
0x3030| 00 2e 73 68 73 74 72 74 61 62 00| ..shstrtab.| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash..." 0x3035-0x30ed (184)
0x3030| 00 2e 73 68 73 74 72 74 61 62 00| ..shstrtab.| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.plt.got\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.ctors\x00.dtors\x00.dynamic\x00.data\x00.bss\x00.comment\x00" 0x3035-0x30ed (184)
0x3040|2e 69 6e 74 65 72 70 00 2e 6e 6f 74 65 2e 67 6e|.interp..note.gn|
* |until 0x30ec.7 (184) | |
0x3480| 01 00 00 00 | .... | name: ".shstrtab" (1) 0x3488-0x348c (4)

View File

@ -553,7 +553,7 @@ $ fq -d ar dv libbbb.a
0x590| 04 00 00 00 | .... | addralign: 4 0x596-0x59a (4)
0x590| 10 00 00 00 | .... | entsize: 16 0x59a-0x59e (4)
| | | [14]{}: section_header 0x25e-0x5c6 (872)
0x250| 00 6c| .l| string: "\x00libbbb.c\x00libbbb_bbb\x00__x86.get_pc_thunk.ax\x00_GLO..." 0x25e-0x2a4 (70)
0x250| 00 6c| .l| string: "\x00libbbb.c\x00libbbb_bbb\x00__x86.get_pc_thunk.ax\x00_GLOBAL_OFFSET_TABLE_\x00puts\x00" 0x25e-0x2a4 (70)
0x260|69 62 62 62 62 2e 63 00 6c 69 62 62 62 62 5f 62|ibbbb.c.libbbb_b|
* |until 0x2a3.7 (70) | |
0x590| 09 00| ..| name: ".strtab" (9) 0x59e-0x5a2 (4)
@ -584,7 +584,7 @@ $ fq -d ar dv libbbb.a
0x5c0|00 00 |.. |
0x5c0| 00 00 00 00 | .... | entsize: 0 0x5c2-0x5c6 (4)
| | | [15]{}: section_header 0x2d6-0x5ee (792)
0x2d0| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss..." 0x2d6-0x36b (149)
0x2d0| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss\x00.rodata\x00.text.__x86.get_pc_thunk.ax\x00.comment\x00.note.GNU-stack\x00.note.gnu.property\x00.rel.eh_frame\x00.group\x00" 0x2d6-0x36b (149)
0x2e0|73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61 62|strtab..shstrtab|
* |until 0x36a.7 (149) | |
0x5c0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x5c6-0x5ca (4)

View File

@ -377,7 +377,7 @@ $ fq -d elf dv libbbb.so
0x3800| 04 00 00 00 | .... | addralign: 4 0x3808-0x380c (4)
0x3800| 10 00 00 00| ....| entsize: 16 0x380c-0x3810 (4)
| | | [3]{}: section_header 0x240-0x3838 (13816)
0x0240|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x240-0x2ef (175)
0x0240|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_registerTMCloneTable\x00__cxa_finalize\x00__deregister_frame_info_bases\x00__register_frame_info_bases\x00libbbb_bbb\x00puts\x00libc.musl-x86.so.1\x00" 0x240-0x2ef (175)
* |until 0x2ee.7 (175) | |
0x3810|2d 00 00 00 |-... | name: ".dynstr" (45) 0x3810-0x3814 (4)
0x3810| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x3814-0x3818 (4)
@ -1475,7 +1475,7 @@ $ fq -d elf dv libbbb.so
0x3c10| 04 00 00 00 | .... | addralign: 4 0x3c18-0x3c1c (4)
0x3c10| 10 00 00 00| ....| entsize: 16 0x3c1c-0x3c20 (4)
| | | [29]{}: section_header 0x3470-0x3c48 (2008)
0x3470|00 63 72 74 73 74 75 66 66 2e 63 00 5f 5f 43 54|.crtstuff.c.__CT| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FR..." 0x3470-0x3687 (535)
0x3470|00 63 72 74 73 74 75 66 66 2e 63 00 5f 5f 43 54|.crtstuff.c.__CT| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.2\x00dtor_idx.1\x00frame_dummy\x00object.0\x00__CTOR_END__\x00__FRAME_END__\x00__do_global_ctors_aux\x00libbbb.c\x00__x86.get_pc_thunk.di\x00_DYNAMIC\x00__TMC_END__\x00__DTOR_END__\x00__x86.get_pc_thunk.ax\x00__dso_handle\x00__x86.get_pc_thunk.dx\x00__x86.get_pc_thunk.bx\x00__GNU_EH_FRAME_HDR\x00_GLOBAL_OFFSET_TABLE_\x00puts\x00__cxa_finalize\x00_init\x00__register_frame_info_bases\x00_ITM_registerTMCloneTable\x00__deregister_frame_info_bases\x00_ITM_deregisterTMCloneTable\x00_fini\x00libbbb_bbb\x00" 0x3470-0x3687 (535)
* |until 0x3686.7 (535) | |
0x3c20|09 00 00 00 |.... | name: ".strtab" (9) 0x3c20-0x3c24 (4)
0x3c20| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x3c24-0x3c28 (4)
@ -1502,7 +1502,7 @@ $ fq -d elf dv libbbb.so
0x3c40|01 00 00 00 |.... | addralign: 1 0x3c40-0x3c44 (4)
0x3c40| 00 00 00 00 | .... | entsize: 0 0x3c44-0x3c48 (4)
| | | [30]{}: section_header 0x3687-0x3c70 (1513)
0x3680| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 0x3687-0x3795 (270)
0x3680| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.plt.got\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.note.gnu.property\x00.ctors\x00.dtors\x00.dynamic\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_str\x00.debug_ranges\x00" 0x3687-0x3795 (270)
0x3690|2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61|.strtab..shstrta|
* |until 0x3794.7 (270) | |
0x3c40| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x3c48-0x3c4c (4)

View File

@ -476,7 +476,7 @@ $ fq -d elf dv a_dynamic
0x3fc0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3fc0-0x3fc8 (8)
0x3fc0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x3fc8-0x3fd0 (8)
| | | [5]{}: section_header 0x468-0x4010 (15272)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x468-0x52a (194)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-x86_64.so.1\x00" 0x468-0x52a (194)
0x0470|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 64|cxa_finalize.__d|
* |until 0x529.7 (194) | |
0x3fd0|48 00 00 00 |H... | name: ".dynstr" (72) 0x3fd0-0x3fd4 (4)
@ -1678,7 +1678,7 @@ $ fq -d elf dv a_dynamic
0x4680|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x4680-0x4688 (8)
0x4680| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x4688-0x4690 (8)
| | | [32]{}: section_header 0x3b70-0x46d0 (2912)
0x3b70|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__..." 0x3b70-0x3d5d (493)
0x3b70|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.2\x00dtor_idx.1\x00frame_dummy\x00object.0\x00__CTOR_END__\x00__FRAME_END__\x00__do_global_ctors_aux\x00a.c\x00_DYNAMIC\x00__GNU_EH_FRAME_HDR\x00_GLOBAL_OFFSET_TABLE_\x00__TMC_END__\x00__DTOR_END__\x00puts\x00__cxa_finalize\x00__dso_handle\x00aaa\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_start_c\x00_ITM_deregisterTMCloneTable\x00__bss_start\x00_fini\x00_edata\x00_end\x00libbbb_bbb\x00__libc_start_main\x00__register_frame_info\x00" 0x3b70-0x3d5d (493)
* |until 0x3d5c.7 (493) | |
0x4690|09 00 00 00 |.... | name: ".strtab" (9) 0x4690-0x4694 (4)
0x4690| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x4694-0x4698 (4)
@ -1706,7 +1706,7 @@ $ fq -d elf dv a_dynamic
0x46c0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x46c0-0x46c8 (8)
0x46c0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x46c8-0x46d0 (8)
| | | [33]{}: section_header 0x3d5d-0x4710 (2483)
0x3d50| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.pr..." 0x3d5d-0x3e8d (304)
0x3d50| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela.dyn\x00.rela.plt\x00.init\x00.plt.got\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.ctors\x00.dtors\x00.dynamic\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x3d5d-0x3e8d (304)
0x3d60|79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73|ymtab..strtab..s|
* |until 0x3e8c.7 (304) | |
0x46d0|11 00 00 00 |.... | name: ".shstrtab" (17) 0x46d0-0x46d4 (4)

View File

@ -2037,7 +2037,7 @@ $ fq -d elf dv a_static
0x14410|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x14410-0x14418 (8)
0x14410| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x14418-0x14420 (8)
| | | [22]{}: section_header 0x137c8-0x14460 (3224)
0x137c0| 00 63 72 74 31 2e 63 00| .crt1.c.| string: "\x00crt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00..." 0x137c8-0x13db2 (1514)
0x137c0| 00 63 72 74 31 2e 63 00| .crt1.c.| string: "\x00crt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.2\x00dtor_idx.1\x00frame_dummy\x00object.0\x00__CTOR_END__\x00__FRAME_END__\x00__do_global_ctors_aux\x00a.c\x00libbbb.c\x00__libc_start_main.c\x00dummy1\x00libc_start_main_stage2\x00defsysinfo.c\x00libc.c\x00stdout.c\x00buf\x00__environ.c\x00__init_tls.c\x00static_init_tls\x00main_tls\x00builtin_tls\x00_Exit.c\x00__lockfile.c\x00__overflow.c\x00__stdio_close.c\x00__stdio_seek.c\x00__stdout_write.c\x00__towrite.c\x00fputs.c\x00fwrite.c\x00strlen.c\x00default_attr.c\x00lseek.c\x00syscall_ret.c\x00__stdio_exit.c\x00close_file\x00dummy_file\x00__stdio_write.c\x00ofl.c\x00ofl_head\x00__lock.c\x00__errno_location.c\x00__fini_array_end\x00__fini_array_start\x00__init_array_end\x00__init_array_start\x00__thread_list_lock\x00__stdout_used\x00stdout\x00__init_libc\x00__syscall_ret\x00__stdout_write\x00__ofl_unlock\x00__unlockfile\x00__hwcap\x00__stdio_write\x00__towrite\x00memcpy\x00__ofl_lock\x00__TMC_END__\x00__unlock\x00__DTOR_END__\x00__overflow\x00__libc\x00__dso_handle\x00__set_thread_area\x00__stdin_used\x00__copy_tls\x00__stdio_seek\x00__lockfile\x00___errno_location\x00aaa\x00_Exit\x00__towrite_needs_stdio_exit\x00__init_tls\x00__funcs_on_exit\x00__memcpy_fwd\x00__stdio_ofl_lockptr\x00fputs_unlocked\x00___environ\x00__progname\x00_start_c\x00__stdout_FILE\x00program_invocation_short_name\x00__libc_start_init\x00__init_tp\x00__init_ssp\x00__fwritex\x00__bss_start\x00__stdio_exit\x00__lock\x00__aio_close\x00__lseek\x00__libc_exit_fini\x00fwrite_unlocked\x00fwrite\x00_edata\x00__stdio_close\x00__stderr_used\x00__stdio_exit_needed\x00libbbb_bbb\x00__libc_start_main\x00strlen\x00lseek64\x00program_invocation_name\x00__default_stacksize\x00fputs\x00__default_guardsize\x00__sysinfo\x00__progname_full\x00" 0x137c8-0x13db2 (1514)
0x137d0|63 72 74 73 74 75 66 66 2e 63 00 5f 5f 43 54 4f|crtstuff.c.__CTO|
* |until 0x13db1.7 (1514) | |
0x14420|09 00 00 00 |.... | name: ".strtab" (9) 0x14420-0x14424 (4)
@ -2066,7 +2066,7 @@ $ fq -d elf dv a_static
0x14450|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x14450-0x14458 (8)
0x14450| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x14458-0x14460 (8)
| | | [23]{}: section_header 0x13db2-0x144a0 (1774)
0x13db0| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.note.gnu.property\x00...." 0x13db2-0x13e99 (231)
0x13db0| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.note.gnu.property\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.ctors\x00.dtors\x00.data.rel.ro\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x13db2-0x13e99 (231)
0x13dc0|61 62 00 2e 73 68 73 74 72 74 61 62 00 2e 6e 6f|ab..shstrtab..no|
* |until 0x13e98.7 (231) | |
0x14460|11 00 00 00 |.... | name: ".shstrtab" (17) 0x14460-0x14464 (4)

View File

@ -476,7 +476,7 @@ $ fq -d elf dv a_stripped
0x3220| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x3228-0x3230 (8)
0x3230|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x3230-0x3238 (8)
| | | [5]{}: section_header 0x468-0x3278 (11792)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x468-0x52a (194)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-x86_64.so.1\x00" 0x468-0x52a (194)
0x0470|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 64|cxa_finalize.__d|
* |until 0x529.7 (194) | |
0x3230| 38 00 00 00 | 8... | name: ".dynstr" (56) 0x3238-0x323c (4)
@ -1046,7 +1046,7 @@ $ fq -d elf dv a_stripped
0x36a0| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x36a8-0x36b0 (8)
0x36b0|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x36b0-0x36b8 (8)
| | | [23]{}: section_header 0x3039-0x36f8 (1727)
0x3030| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash..." 0x3039-0x30f3 (186)
0x3030| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela.dyn\x00.rela.plt\x00.init\x00.plt.got\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.ctors\x00.dtors\x00.dynamic\x00.data\x00.bss\x00.comment\x00" 0x3039-0x30f3 (186)
0x3040|74 61 62 00 2e 69 6e 74 65 72 70 00 2e 6e 6f 74|tab..interp..not|
* |until 0x30f2.7 (186) | |
0x36b0| 01 00 00 00 | .... | name: ".shstrtab" (1) 0x36b8-0x36bc (4)

View File

@ -517,7 +517,7 @@ $ fq -d ar dv libbbb.a
0x630|00 00 00 00 |.... |
0x630| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x634-0x63c (8)
| | | [13]{}: section_header 0x284-0x67c (1016)
0x280| 00 2e 73 79 6d 74 61 62 00 2e 73 74| ..symtab..st| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bs..." 0x284-0x2f8 (116)
0x280| 00 2e 73 79 6d 74 61 62 00 2e 73 74| ..symtab..st| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bss\x00.rodata\x00.comment\x00.note.GNU-stack\x00.note.gnu.property\x00.rela.eh_frame\x00" 0x284-0x2f8 (116)
0x290|72 74 61 62 00 2e 73 68 73 74 72 74 61 62 00 2e|rtab..shstrtab..|
* |until 0x2f7.7 (116) | |
0x630| 11 00 00 00| ....| name: ".shstrtab" (17) 0x63c-0x640 (4)

View File

@ -379,7 +379,7 @@ $ fq -d elf dv libbbb.so
0x3940|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3940-0x3948 (8)
0x3940| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x3948-0x3950 (8)
| | | [3]{}: section_header 0x390-0x3990 (13824)
0x0390|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x390-0x436 (166)
0x0390|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_registerTMCloneTable\x00__cxa_finalize\x00__deregister_frame_info\x00__register_frame_info\x00libbbb_bbb\x00puts\x00libc.musl-x86_64.so.1\x00" 0x390-0x436 (166)
* |until 0x435.7 (166) | |
0x3950|2d 00 00 00 |-... | name: ".dynstr" (45) 0x3950-0x3954 (4)
0x3950| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x3954-0x3958 (4)
@ -1466,7 +1466,7 @@ $ fq -d elf dv libbbb.so
0x3fc0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3fc0-0x3fc8 (8)
0x3fc0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x3fc8-0x3fd0 (8)
| | | [29]{}: section_header 0x35c8-0x4010 (2632)
0x35c0| 00 63 72 74 73 74 75 66| .crtstuf| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FR..." 0x35c8-0x377b (435)
0x35c0| 00 63 72 74 73 74 75 66| .crtstuf| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.2\x00dtor_idx.1\x00frame_dummy\x00object.0\x00__CTOR_END__\x00__FRAME_END__\x00__do_global_ctors_aux\x00libbbb.c\x00_DYNAMIC\x00__TMC_END__\x00__DTOR_END__\x00__dso_handle\x00__GNU_EH_FRAME_HDR\x00_GLOBAL_OFFSET_TABLE_\x00puts\x00__cxa_finalize\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00_fini\x00libbbb_bbb\x00__register_frame_info\x00" 0x35c8-0x377b (435)
0x35d0|66 2e 63 00 5f 5f 43 54 4f 52 5f 4c 49 53 54 5f|f.c.__CTOR_LIST_|
* |until 0x377a.7 (435) | |
0x3fd0|09 00 00 00 |.... | name: ".strtab" (9) 0x3fd0-0x3fd4 (4)
@ -1495,7 +1495,7 @@ $ fq -d elf dv libbbb.so
0x4000|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4000-0x4008 (8)
0x4000| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4008-0x4010 (8)
| | | [30]{}: section_header 0x377b-0x4050 (2261)
0x3770| 00 2e 73 79 6d| ..sym| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 0x377b-0x388b (272)
0x3770| 00 2e 73 79 6d| ..sym| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela.dyn\x00.rela.plt\x00.init\x00.plt.got\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.note.gnu.property\x00.ctors\x00.dtors\x00.dynamic\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_str\x00.debug_ranges\x00" 0x377b-0x388b (272)
0x3780|74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 73|tab..strtab..shs|
* |until 0x388a.7 (272) | |
0x4010|11 00 00 00 |.... | name: ".shstrtab" (17) 0x4010-0x4014 (4)

View File

@ -391,7 +391,7 @@ $ fq -d elf dv a_dynamic
0x2430|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2430-0x2438 (8)
0x2430| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x2438-0x2440 (8)
| | | [4]{}: section_header 0x380-0x2480 (8448)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x380-0x443 (195)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-aarch64.so.1\x00" 0x380-0x443 (195)
* |until 0x442.7 (195) | |
0x2440|35 00 00 00 |5... | name: ".dynstr" (53) 0x2440-0x2444 (4)
0x2440| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x2444-0x2448 (4)
@ -1998,7 +1998,7 @@ $ fq -d elf dv a_dynamic
0x2ab0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2ab0-0x2ab8 (8)
0x2ab0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x2ab8-0x2ac0 (8)
| | | [30]{}: section_header 0x2008-0x2b00 (2808)
0x2000| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$x\x00crti.o\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FR..." 0x2008-0x221a (530)
0x2000| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$x\x00crti.o\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00a.c\x00__FRAME_END__\x00_DYNAMIC\x00__GNU_EH_FRAME_HDR\x00_GLOBAL_OFFSET_TABLE_\x00__TMC_END__\x00puts\x00__cxa_finalize\x00__bss_start__\x00__dso_handle\x00aaa\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00__bss_end__\x00_start_c\x00_ITM_deregisterTMCloneTable\x00__bss_start\x00__end__\x00_fini\x00_edata\x00_end\x00libbbb_bbb\x00__libc_start_main\x00__register_frame_info\x00" 0x2008-0x221a (530)
0x2010|00 24 78 00 63 72 74 69 2e 6f 00 63 72 74 6e 2e|.$x.crti.o.crtn.|
* |until 0x2219.7 (530) | |
0x2ac0|09 00 00 00 |.... | name: ".strtab" (9) 0x2ac0-0x2ac4 (4)
@ -2027,7 +2027,7 @@ $ fq -d elf dv a_dynamic
0x2af0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2af0-0x2af8 (8)
0x2af0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2af8-0x2b00 (8)
| | | [31]{}: section_header 0x221a-0x2b40 (2342)
0x2210| 00 2e 73 79 6d 74| ..symt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 0x221a-0x233d (291)
0x2210| 00 2e 73 79 6d 74| ..symt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela.dyn\x00.rela.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x221a-0x233d (291)
0x2220|61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 73 74|ab..strtab..shst|
* |until 0x233c.7 (291) | |
0x2b00|11 00 00 00 |.... | name: ".shstrtab" (17) 0x2b00-0x2b04 (4)

View File

@ -2916,7 +2916,7 @@ $ fq -d elf dv a_static
0x154d0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x154d0-0x154d8 (8)
0x154d0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x154d8-0x154e0 (8)
| | | [22]{}: section_header 0x14830-0x15520 (3312)
0x14830|00 63 72 74 69 2e 6f 00 24 78 00 63 72 74 6e 2e|.crti.o.$x.crtn.| string: "\x00crti.o\x00$x\x00crtn.o\x00crt1.c\x00crtstuff.c\x00$d\x00__EH_FRA..." 0x14830-0x14e78 (1608)
0x14830|00 63 72 74 69 2e 6f 00 24 78 00 63 72 74 6e 2e|.crti.o.$x.crtn.| string: "\x00crti.o\x00$x\x00crtn.o\x00crt1.c\x00crtstuff.c\x00$d\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00a.c\x00libbbb.c\x00__libc_start_main.c\x00dummy1\x00libc_start_main_stage2\x00defsysinfo.c\x00libc.c\x00stdout.c\x00buf\x00memset.lo\x00__environ.c\x00__init_tls.c\x00static_init_tls\x00builtin_tls\x00main_tls\x00_Exit.c\x00__lockfile.c\x00__overflow.c\x00__stdio_close.c\x00__stdio_seek.c\x00__stdout_write.c\x00__towrite.c\x00fputs.c\x00fwrite.c\x00memcpy.lo\x00strlen.c\x00__set_thread_area.lo\x00default_attr.c\x00lseek.c\x00syscall_ret.c\x00__stdio_exit.c\x00close_file\x00dummy_file\x00__stdio_write.c\x00ofl.c\x00ofl_head\x00__lock.c\x00__errno_location.c\x00__FRAME_END__\x00__fini_array_end\x00__fini_array_start\x00__init_array_end\x00_GLOBAL_OFFSET_TABLE_\x00__init_array_start\x00__thread_list_lock\x00__stdout_used\x00stdout\x00__init_libc\x00__syscall_ret\x00__stdout_write\x00__ofl_unlock\x00__unlockfile\x00__hwcap\x00__stdio_write\x00__towrite\x00memcpy\x00__ofl_lock\x00__TMC_END__\x00__unlock\x00__overflow\x00__libc\x00__bss_start__\x00__dso_handle\x00__set_thread_area\x00__stdin_used\x00__copy_tls\x00__stdio_seek\x00__lockfile\x00___errno_location\x00aaa\x00_Exit\x00__towrite_needs_stdio_exit\x00__init_tls\x00__funcs_on_exit\x00__stdio_ofl_lockptr\x00fputs_unlocked\x00__bss_end__\x00___environ\x00__progname\x00_start_c\x00__stdout_FILE\x00program_invocation_short_name\x00__libc_start_init\x00__init_tp\x00__init_ssp\x00__fwritex\x00__bss_start\x00memset\x00__stdio_exit\x00__lock\x00__end__\x00__aio_close\x00__lseek\x00__libc_exit_fini\x00fwrite_unlocked\x00fwrite\x00_edata\x00__stdio_close\x00__stderr_used\x00__stdio_exit_needed\x00libbbb_bbb\x00__libc_start_main\x00strlen\x00lseek64\x00program_invocation_name\x00__default_stacksize\x00fputs\x00__default_guardsize\x00__sysinfo\x00__progname_full\x00" 0x14830-0x14e78 (1608)
* |until 0x14e77.7 (1608) | |
0x154e0|09 00 00 00 |.... | name: ".strtab" (9) 0x154e0-0x154e4 (4)
0x154e0| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x154e4-0x154e8 (4)
@ -2944,7 +2944,7 @@ $ fq -d elf dv a_static
0x15510|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x15510-0x15518 (8)
0x15510| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x15518-0x15520 (8)
| | | [23]{}: section_header 0x14e78-0x15560 (1768)
0x14e70| 00 2e 73 79 6d 74 61 62| ..symtab| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.init\x00.text\x00.fini\x00.r..." 0x14e78-0x14f5b (227)
0x14e70| 00 2e 73 79 6d 74 61 62| ..symtab| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.data.rel.ro\x00.got\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x14e78-0x14f5b (227)
0x14e80|00 2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74|..strtab..shstrt|
* |until 0x14f5a.7 (227) | |
0x15520|11 00 00 00 |.... | name: ".shstrtab" (17) 0x15520-0x15524 (4)

View File

@ -391,7 +391,7 @@ $ fq -d elf dv a_stripped
0x11d0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x11d8-0x11e0 (8)
0x11e0|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x11e0-0x11e8 (8)
| | | [4]{}: section_header 0x380-0x1228 (3752)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x380-0x443 (195)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-aarch64.so.1\x00" 0x380-0x443 (195)
* |until 0x442.7 (195) | |
0x11e0| 25 00 00 00 | %... | name: ".dynstr" (37) 0x11e8-0x11ec (4)
0x11e0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x11ec-0x11f0 (4)
@ -942,7 +942,7 @@ $ fq -d elf dv a_stripped
0x1610| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x1618-0x1620 (8)
0x1620|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x1620-0x1628 (8)
| | | [21]{}: section_header 0x1039-0x1668 (1583)
0x1030| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.r..." 0x1039-0x10e6 (173)
0x1030| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela.dyn\x00.rela.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00" 0x1039-0x10e6 (173)
0x1040|74 61 62 00 2e 69 6e 74 65 72 70 00 2e 67 6e 75|tab..interp..gnu|
* |until 0x10e5.7 (173) | |
0x1620| 01 00 00 00 | .... | name: ".shstrtab" (1) 0x1628-0x162c (4)

View File

@ -552,7 +552,7 @@ $ fq -d ar dv libbbb.a
0x690| 00 00 00 00| ....| entsize: 0 0x69c-0x6a4 (8)
0x6a0|00 00 00 00 |.... |
| | | [12]{}: section_header 0x33c-0x6e4 (936)
0x330| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bs..." 0x33c-0x39d (97)
0x330| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bss\x00.rodata\x00.comment\x00.note.GNU-stack\x00.rela.eh_frame\x00" 0x33c-0x39d (97)
0x340|6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68|mtab..strtab..sh|
* |until 0x39c.7 (97) | |
0x6a0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x6a4-0x6a8 (4)

View File

@ -327,7 +327,7 @@ $ fq -d elf dv libbbb.so
0x1cd0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x1cd8-0x1ce0 (8)
0x1ce0|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x1ce0-0x1ce8 (8)
| | | [3]{}: section_header 0x2e0-0x1d28 (6728)
0x02e0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x2e0-0x387 (167)
0x02e0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_registerTMCloneTable\x00__cxa_finalize\x00__deregister_frame_info\x00__register_frame_info\x00libbbb_bbb\x00puts\x00libc.musl-aarch64.so.1\x00" 0x2e0-0x387 (167)
* |until 0x386.7 (167) | |
0x1ce0| 2d 00 00 00 | -... | name: ".dynstr" (45) 0x1ce8-0x1cec (4)
0x1ce0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x1cec-0x1cf0 (4)
@ -1715,7 +1715,7 @@ $ fq -d elf dv libbbb.so
0x22d0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x22d8-0x22e0 (8)
0x22e0|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x22e0-0x22e8 (8)
| | | [27]{}: section_header 0x1968-0x2328 (2496)
0x1960| 00 63 72 74 69 2e 6f 00| .crti.o.| string: "\x00crti.o\x00$x\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FRAME_BEGI..." 0x1968-0x1b1e (438)
0x1960| 00 63 72 74 69 2e 6f 00| .crti.o.| string: "\x00crti.o\x00$x\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FRAME_BEGIN__\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00libbbb.c\x00__FRAME_END__\x00_DYNAMIC\x00__TMC_END__\x00__dso_handle\x00__GNU_EH_FRAME_HDR\x00_GLOBAL_OFFSET_TABLE_\x00puts\x00__cxa_finalize\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00_fini\x00libbbb_bbb\x00__register_frame_info\x00" 0x1968-0x1b1e (438)
0x1970|24 78 00 63 72 74 6e 2e 6f 00 63 72 74 73 74 75|$x.crtn.o.crtstu|
* |until 0x1b1d.7 (438) | |
0x22e0| 09 00 00 00 | .... | name: ".strtab" (9) 0x22e8-0x22ec (4)
@ -1744,7 +1744,7 @@ $ fq -d elf dv libbbb.so
0x2310| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2318-0x2320 (8)
0x2320|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2320-0x2328 (8)
| | | [28]{}: section_header 0x1b1e-0x2368 (2122)
0x1b10| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 0x1b1e-0x1c21 (259)
0x1b10| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela.dyn\x00.rela.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame_hdr\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_str\x00.debug_ranges\x00" 0x1b1e-0x1c21 (259)
0x1b20|73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e|symtab..strtab..|
* |until 0x1c20.7 (259) | |
0x2320| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x2328-0x232c (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_dynamic
0x20f0| 04 00 00 00 | .... | addralign: 4 0x20f4-0x20f8 (4)
0x20f0| 10 00 00 00 | .... | entsize: 16 0x20f8-0x20fc (4)
| | | [4]{}: section_header 0x220-0x2124 (7940)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e1 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-armhf.so.1\x00" 0x220-0x2e1 (193)
* |until 0x2e0.7 (193) | |
0x20f0| 35 00 00 00| 5...| name: ".dynstr" (53) 0x20fc-0x2100 (4)
0x2100|03 00 00 00 |.... | type: "strtab" (0x3) (String table) 0x2100-0x2104 (4)
@ -2092,7 +2092,7 @@ $ fq -d elf dv a_dynamic
0x2500| 04 00 00 00 | .... | addralign: 4 0x2504-0x2508 (4)
0x2500| 10 00 00 00 | .... | entsize: 16 0x2508-0x250c (4)
| | | [30]{}: section_header 0x1d38-0x2534 (2044)
0x1d30| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_imp..." 0x1d38-0x1f36 (510)
0x1d30| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_implied_fbits\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00a.c\x00__FRAME_END__\x00_DYNAMIC\x00_GLOBAL_OFFSET_TABLE_\x00__TMC_END__\x00puts\x00__cxa_finalize\x00__bss_start__\x00__dso_handle\x00aaa\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00__bss_end__\x00_start_c\x00_ITM_deregisterTMCloneTable\x00__bss_start\x00__end__\x00_fini\x00_edata\x00_end\x00libbbb_bbb\x00__libc_start_main\x00__register_frame_info\x00" 0x1d38-0x1f36 (510)
0x1d40|00 24 61 00 24 64 00 63 72 74 69 2e 6f 00 63 72|.$a.$d.crti.o.cr|
* |until 0x1f35.7 (510) | |
0x2500| 09 00 00 00| ....| name: ".strtab" (9) 0x250c-0x2510 (4)
@ -2120,7 +2120,7 @@ $ fq -d elf dv a_dynamic
0x2520| 01 00 00 00| ....| addralign: 1 0x252c-0x2530 (4)
0x2530|00 00 00 00 |.... | entsize: 0 0x2530-0x2534 (4)
| | | [31]{}: section_header 0x1f36-0x255c (1574)
0x1f30| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 0x1f36-0x2059 (291)
0x1f30| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x1f36-0x2059 (291)
0x1f40|73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61 62|strtab..shstrtab|
* |until 0x2058.7 (291) | |
0x2530| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x2534-0x2538 (4)

View File

@ -3788,7 +3788,7 @@ $ fq -d elf dv a_static
0x14d50|04 00 00 00 |.... | addralign: 4 0x14d50-0x14d54 (4)
0x14d50| 10 00 00 00 | .... | entsize: 16 0x14d54-0x14d58 (4)
| | | [23]{}: section_header 0x14060-0x14d80 (3360)
0x14060|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00$d\x00crt1.c\x00crtstuff.c\x00all_impl..." 0x14060-0x148cd (2157)
0x14060|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00$d\x00crt1.c\x00crtstuff.c\x00all_implied_fbits\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00libbbb.c\x00__libc_start_main.c\x00dummy1\x00libc_start_main_stage2\x00defsysinfo.c\x00libc.c\x00stdout.c\x00buf\x00memset.c\x00__environ.c\x00__init_tls.c\x00static_init_tls\x00builtin_tls\x00main_tls\x00_Exit.c\x00__lockfile.c\x00a_barrier\x00__overflow.c\x00__stdio_close.c\x00__stdio_seek.c\x00__stdout_write.c\x00__towrite.c\x00fputs.c\x00fwrite.c\x00memcpy.lo\x00copy_last_3_and_return\x00src_aligned\x00non_congruent\x00congruent_aligned32\x00cached_aligned32\x00less_than_32_left\x00partial_word_tail\x00less_than_thirtytwo\x00loop24\x00loop8\x00loop16\x00strlen.c\x00__set_thread_area.c\x00atomics.lo\x00default_attr.c\x00lseek.c\x00syscall_ret.c\x00__stdio_exit.c\x00close_file\x00dummy_file\x00__stdio_write.c\x00ofl.c\x00ofl_head\x00__lock.c\x00__errno_location.c\x00_udivsi3.o\x00.udivsi3_skip_div0_test\x00shift\x00_dvmd_lnx.o\x00raise.c\x00block.c\x00all_mask\x00app_mask\x00__FRAME_END__\x00__fini_array_end\x00__fini_array_start\x00__init_array_end\x00_GLOBAL_OFFSET_TABLE_\x00__init_array_start\x00__a_barrier_v7\x00__thread_list_lock\x00__a_gettp_ptr\x00__stdout_used\x00stdout\x00__a_barrier_ptr\x00__init_libc\x00__syscall_ret\x00__stdout_write\x00__ofl_unlock\x00__unlockfile\x00__hwcap\x00__restore_sigs\x00__stdio_write\x00__towrite\x00memcpy\x00__ofl_lock\x00__TMC_END__\x00__unlock\x00__overflow\x00__libc\x00__udivsi3\x00__bss_start__\x00__dso_handle\x00__set_thread_area\x00__stdin_used\x00__copy_tls\x00__stdio_seek\x00__lockfile\x00___errno_location\x00aaa\x00_Exit\x00__towrite_needs_stdio_exit\x00__a_gettp_cp15\x00__a_cas_v7\x00__init_tls\x00__funcs_on_exit\x00__a_cas_dummy\x00__stdio_ofl_lockptr\x00fputs_unlocked\x00__a_barrier_oldkuser\x00__bss_end__\x00___environ\x00__progname\x00_start_c\x00__block_all_sigs\x00__stdout_FILE\x00program_invocation_short_name\x00__libc_start_init\x00__init_tp\x00__init_ssp\x00__aeabi_ldiv0\x00__fwritex\x00__bss_start\x00memset\x00__a_barrier_v6\x00__stdio_exit\x00__aeabi_uidiv\x00__lock\x00__end__\x00__a_cas_v6\x00__aio_close\x00__lseek\x00__a_cas_ptr\x00__libc_exit_fini\x00fwrite_unlocked\x00__aeabi_uidivmod\x00fwrite\x00_edata\x00__stdio_close\x00__stderr_used\x00__stdio_exit_needed\x00__a_barrier_dummy\x00__aeabi_idiv0\x00libbbb_bbb\x00__libc_start_main\x00strlen\x00lseek64\x00program_invocation_name\x00__default_stacksize\x00fputs\x00__default_guardsize\x00__block_app_sigs\x00__sysinfo\x00__progname_full\x00raise\x00" 0x14060-0x148cd (2157)
* |until 0x148cc.7 (2157) | |
0x14d50| 09 00 00 00 | .... | name: ".strtab" (9) 0x14d58-0x14d5c (4)
0x14d50| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x14d5c-0x14d60 (4)
@ -3815,7 +3815,7 @@ $ fq -d elf dv a_static
0x14d70| 01 00 00 00 | .... | addralign: 1 0x14d78-0x14d7c (4)
0x14d70| 00 00 00 00| ....| entsize: 0 0x14d7c-0x14d80 (4)
| | | [24]{}: section_header 0x148cd-0x14da8 (1243)
0x148c0| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.init\x00.text\x00.fini\x00.r..." 0x148cd-0x149c0 (243)
0x148c0| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.data.rel.ro\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x148cd-0x149c0 (243)
0x148d0|79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73|ymtab..strtab..s|
* |until 0x149bf.7 (243) | |
0x14d80|11 00 00 00 |.... | name: ".shstrtab" (17) 0x14d80-0x14d84 (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_stripped
0x11b0|04 00 00 00 |.... | addralign: 4 0x11b0-0x11b4 (4)
0x11b0| 10 00 00 00 | .... | entsize: 16 0x11b4-0x11b8 (4)
| | | [4]{}: section_header 0x220-0x11e0 (4032)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e1 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-armhf.so.1\x00" 0x220-0x2e1 (193)
* |until 0x2e0.7 (193) | |
0x11b0| 25 00 00 00 | %... | name: ".dynstr" (37) 0x11b8-0x11bc (4)
0x11b0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x11bc-0x11c0 (4)
@ -915,7 +915,7 @@ $ fq -d elf dv a_stripped
0x1450| 01 00 00 00 | .... | addralign: 1 0x1458-0x145c (4)
0x1450| 00 00 00 00| ....| entsize: 0 0x145c-0x1460 (4)
| | | [21]{}: section_header 0x1068-0x1488 (1056)
0x1060| 00 2e 73 68 73 74 72 74| ..shstrt| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.r..." 0x1068-0x1115 (173)
0x1060| 00 2e 73 68 73 74 72 74| ..shstrt| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00" 0x1068-0x1115 (173)
0x1070|61 62 00 2e 69 6e 74 65 72 70 00 2e 67 6e 75 2e|ab..interp..gnu.|
* |until 0x1114.7 (173) | |
0x1460|01 00 00 00 |.... | name: ".shstrtab" (1) 0x1460-0x1464 (4)

View File

@ -473,7 +473,7 @@ $ fq -d ar dv libbbb.a
0x480|01 00 00 00 |.... | addralign: 1 0x480-0x484 (4)
0x480| 00 00 00 00 | .... | entsize: 0 0x484-0x488 (4)
| | | [11]{}: section_header 0x26c-0x4b0 (580)
0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss..." 0x26c-0x2cd (97)
0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss\x00.rodata\x00.comment\x00.note.GNU-stack\x00.ARM.attributes\x00" 0x26c-0x2cd (97)
0x270|6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68|mtab..strtab..sh|
* |until 0x2cc.7 (97) | |
0x480| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x488-0x48c (4)

View File

@ -305,7 +305,7 @@ $ fq -d elf dv libbbb.so
0x1a80| 04 00 00 00 | .... | addralign: 4 0x1a88-0x1a8c (4)
0x1a80| 10 00 00 00| ....| entsize: 16 0x1a8c-0x1a90 (4)
| | | [3]{}: section_header 0x1c0-0x1ab8 (6392)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x1c0-0x265 (165)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_registerTMCloneTable\x00__cxa_finalize\x00__deregister_frame_info\x00__register_frame_info\x00libbbb_bbb\x00puts\x00libc.musl-armhf.so.1\x00" 0x1c0-0x265 (165)
* |until 0x264.7 (165) | |
0x1a90|2d 00 00 00 |-... | name: ".dynstr" (45) 0x1a90-0x1a94 (4)
0x1a90| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1a94-0x1a98 (4)
@ -1769,7 +1769,7 @@ $ fq -d elf dv libbbb.so
0x1e40| 04 00 00 00 | .... | addralign: 4 0x1e48-0x1e4c (4)
0x1e40| 10 00 00 00| ....| entsize: 16 0x1e4c-0x1e50 (4)
| | | [27]{}: section_header 0x1770-0x1e78 (1800)
0x1770|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00crtstuff.c\x00$d\x00all_implied_fbi..." 0x1770-0x1912 (418)
0x1770|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00crtstuff.c\x00$d\x00all_implied_fbits\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00libbbb.c\x00__FRAME_END__\x00_DYNAMIC\x00__TMC_END__\x00__dso_handle\x00_GLOBAL_OFFSET_TABLE_\x00puts\x00__cxa_finalize\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00_fini\x00libbbb_bbb\x00__register_frame_info\x00" 0x1770-0x1912 (418)
* |until 0x1911.7 (418) | |
0x1e50|09 00 00 00 |.... | name: ".strtab" (9) 0x1e50-0x1e54 (4)
0x1e50| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1e54-0x1e58 (4)
@ -1796,7 +1796,7 @@ $ fq -d elf dv libbbb.so
0x1e70|01 00 00 00 |.... | addralign: 1 0x1e70-0x1e74 (4)
0x1e70| 00 00 00 00 | .... | entsize: 0 0x1e74-0x1e78 (4)
| | | [28]{}: section_header 0x1912-0x1ea0 (1422)
0x1910| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 0x1912-0x1a15 (259)
0x1910| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_str\x00.debug_ranges\x00" 0x1912-0x1a15 (259)
0x1920|61 62 00 2e 73 68 73 74 72 74 61 62 00 2e 67 6e|ab..shstrtab..gn|
* |until 0x1a14.7 (259) | |
0x1e70| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x1e78-0x1e7c (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_dynamic
0x20f0| 04 00 00 00 | .... | addralign: 4 0x20f4-0x20f8 (4)
0x20f0| 10 00 00 00 | .... | entsize: 16 0x20f8-0x20fc (4)
| | | [4]{}: section_header 0x220-0x2124 (7940)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e1 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-armhf.so.1\x00" 0x220-0x2e1 (193)
* |until 0x2e0.7 (193) | |
0x20f0| 35 00 00 00| 5...| name: ".dynstr" (53) 0x20fc-0x2100 (4)
0x2100|03 00 00 00 |.... | type: "strtab" (0x3) (String table) 0x2100-0x2104 (4)
@ -2092,7 +2092,7 @@ $ fq -d elf dv a_dynamic
0x2500| 04 00 00 00 | .... | addralign: 4 0x2504-0x2508 (4)
0x2500| 10 00 00 00 | .... | entsize: 16 0x2508-0x250c (4)
| | | [30]{}: section_header 0x1d38-0x2534 (2044)
0x1d30| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_imp..." 0x1d38-0x1f36 (510)
0x1d30| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_implied_fbits\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00a.c\x00__FRAME_END__\x00_DYNAMIC\x00_GLOBAL_OFFSET_TABLE_\x00__TMC_END__\x00puts\x00__cxa_finalize\x00__bss_start__\x00__dso_handle\x00aaa\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00__bss_end__\x00_start_c\x00_ITM_deregisterTMCloneTable\x00__bss_start\x00__end__\x00_fini\x00_edata\x00_end\x00libbbb_bbb\x00__libc_start_main\x00__register_frame_info\x00" 0x1d38-0x1f36 (510)
0x1d40|00 24 61 00 24 64 00 63 72 74 69 2e 6f 00 63 72|.$a.$d.crti.o.cr|
* |until 0x1f35.7 (510) | |
0x2500| 09 00 00 00| ....| name: ".strtab" (9) 0x250c-0x2510 (4)
@ -2120,7 +2120,7 @@ $ fq -d elf dv a_dynamic
0x2520| 01 00 00 00| ....| addralign: 1 0x252c-0x2530 (4)
0x2530|00 00 00 00 |.... | entsize: 0 0x2530-0x2534 (4)
| | | [31]{}: section_header 0x1f36-0x255c (1574)
0x1f30| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 0x1f36-0x2059 (291)
0x1f30| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x1f36-0x2059 (291)
0x1f40|73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61 62|strtab..shstrtab|
* |until 0x2058.7 (291) | |
0x2530| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x2534-0x2538 (4)

View File

@ -3788,7 +3788,7 @@ $ fq -d elf dv a_static
0x14d50|04 00 00 00 |.... | addralign: 4 0x14d50-0x14d54 (4)
0x14d50| 10 00 00 00 | .... | entsize: 16 0x14d54-0x14d58 (4)
| | | [23]{}: section_header 0x14060-0x14d80 (3360)
0x14060|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00$d\x00crt1.c\x00crtstuff.c\x00all_impl..." 0x14060-0x148cd (2157)
0x14060|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00$d\x00crt1.c\x00crtstuff.c\x00all_implied_fbits\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00libbbb.c\x00__libc_start_main.c\x00dummy1\x00libc_start_main_stage2\x00defsysinfo.c\x00libc.c\x00stdout.c\x00buf\x00memset.c\x00__environ.c\x00__init_tls.c\x00static_init_tls\x00builtin_tls\x00main_tls\x00_Exit.c\x00__lockfile.c\x00a_barrier\x00__overflow.c\x00__stdio_close.c\x00__stdio_seek.c\x00__stdout_write.c\x00__towrite.c\x00fputs.c\x00fwrite.c\x00memcpy.lo\x00copy_last_3_and_return\x00src_aligned\x00non_congruent\x00congruent_aligned32\x00cached_aligned32\x00less_than_32_left\x00partial_word_tail\x00less_than_thirtytwo\x00loop24\x00loop8\x00loop16\x00strlen.c\x00__set_thread_area.c\x00atomics.lo\x00default_attr.c\x00lseek.c\x00syscall_ret.c\x00__stdio_exit.c\x00close_file\x00dummy_file\x00__stdio_write.c\x00ofl.c\x00ofl_head\x00__lock.c\x00__errno_location.c\x00_udivsi3.o\x00.udivsi3_skip_div0_test\x00shift\x00_dvmd_lnx.o\x00raise.c\x00block.c\x00all_mask\x00app_mask\x00__FRAME_END__\x00__fini_array_end\x00__fini_array_start\x00__init_array_end\x00_GLOBAL_OFFSET_TABLE_\x00__init_array_start\x00__a_barrier_v7\x00__thread_list_lock\x00__a_gettp_ptr\x00__stdout_used\x00stdout\x00__a_barrier_ptr\x00__init_libc\x00__syscall_ret\x00__stdout_write\x00__ofl_unlock\x00__unlockfile\x00__hwcap\x00__restore_sigs\x00__stdio_write\x00__towrite\x00memcpy\x00__ofl_lock\x00__TMC_END__\x00__unlock\x00__overflow\x00__libc\x00__udivsi3\x00__bss_start__\x00__dso_handle\x00__set_thread_area\x00__stdin_used\x00__copy_tls\x00__stdio_seek\x00__lockfile\x00___errno_location\x00aaa\x00_Exit\x00__towrite_needs_stdio_exit\x00__a_gettp_cp15\x00__a_cas_v7\x00__init_tls\x00__funcs_on_exit\x00__a_cas_dummy\x00__stdio_ofl_lockptr\x00fputs_unlocked\x00__a_barrier_oldkuser\x00__bss_end__\x00___environ\x00__progname\x00_start_c\x00__block_all_sigs\x00__stdout_FILE\x00program_invocation_short_name\x00__libc_start_init\x00__init_tp\x00__init_ssp\x00__aeabi_ldiv0\x00__fwritex\x00__bss_start\x00memset\x00__a_barrier_v6\x00__stdio_exit\x00__aeabi_uidiv\x00__lock\x00__end__\x00__a_cas_v6\x00__aio_close\x00__lseek\x00__a_cas_ptr\x00__libc_exit_fini\x00fwrite_unlocked\x00__aeabi_uidivmod\x00fwrite\x00_edata\x00__stdio_close\x00__stderr_used\x00__stdio_exit_needed\x00__a_barrier_dummy\x00__aeabi_idiv0\x00libbbb_bbb\x00__libc_start_main\x00strlen\x00lseek64\x00program_invocation_name\x00__default_stacksize\x00fputs\x00__default_guardsize\x00__block_app_sigs\x00__sysinfo\x00__progname_full\x00raise\x00" 0x14060-0x148cd (2157)
* |until 0x148cc.7 (2157) | |
0x14d50| 09 00 00 00 | .... | name: ".strtab" (9) 0x14d58-0x14d5c (4)
0x14d50| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x14d5c-0x14d60 (4)
@ -3815,7 +3815,7 @@ $ fq -d elf dv a_static
0x14d70| 01 00 00 00 | .... | addralign: 1 0x14d78-0x14d7c (4)
0x14d70| 00 00 00 00| ....| entsize: 0 0x14d7c-0x14d80 (4)
| | | [24]{}: section_header 0x148cd-0x14da8 (1243)
0x148c0| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.init\x00.text\x00.fini\x00.r..." 0x148cd-0x149c0 (243)
0x148c0| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.data.rel.ro\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_frame\x00.debug_str\x00.debug_loc\x00.debug_ranges\x00" 0x148cd-0x149c0 (243)
0x148d0|79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73|ymtab..strtab..s|
* |until 0x149bf.7 (243) | |
0x14d80|11 00 00 00 |.... | name: ".shstrtab" (17) 0x14d80-0x14d84 (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_stripped
0x11b0|04 00 00 00 |.... | addralign: 4 0x11b0-0x11b4 (4)
0x11b0| 10 00 00 00 | .... | entsize: 16 0x11b4-0x11b8 (4)
| | | [4]{}: section_header 0x220-0x11e0 (4032)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e1 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00__register_frame_info\x00_init\x00_fini\x00libbbb_bbb\x00__libc_start_main\x00libbbb.so\x00libc.musl-armhf.so.1\x00" 0x220-0x2e1 (193)
* |until 0x2e0.7 (193) | |
0x11b0| 25 00 00 00 | %... | name: ".dynstr" (37) 0x11b8-0x11bc (4)
0x11b0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x11bc-0x11c0 (4)
@ -915,7 +915,7 @@ $ fq -d elf dv a_stripped
0x1450| 01 00 00 00 | .... | addralign: 1 0x1458-0x145c (4)
0x1450| 00 00 00 00| ....| entsize: 0 0x145c-0x1460 (4)
| | | [21]{}: section_header 0x1068-0x1488 (1056)
0x1060| 00 2e 73 68 73 74 72 74| ..shstrt| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.r..." 0x1068-0x1115 (173)
0x1060| 00 2e 73 68 73 74 72 74| ..shstrt| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00" 0x1068-0x1115 (173)
0x1070|61 62 00 2e 69 6e 74 65 72 70 00 2e 67 6e 75 2e|ab..interp..gnu.|
* |until 0x1114.7 (173) | |
0x1460|01 00 00 00 |.... | name: ".shstrtab" (1) 0x1460-0x1464 (4)

View File

@ -473,7 +473,7 @@ $ fq -d ar dv libbbb.a
0x480|01 00 00 00 |.... | addralign: 1 0x480-0x484 (4)
0x480| 00 00 00 00 | .... | entsize: 0 0x484-0x488 (4)
| | | [11]{}: section_header 0x26c-0x4b0 (580)
0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss..." 0x26c-0x2cd (97)
0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss\x00.rodata\x00.comment\x00.note.GNU-stack\x00.ARM.attributes\x00" 0x26c-0x2cd (97)
0x270|6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68|mtab..strtab..sh|
* |until 0x2cc.7 (97) | |
0x480| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x488-0x48c (4)

View File

@ -305,7 +305,7 @@ $ fq -d elf dv libbbb.so
0x1a80| 04 00 00 00 | .... | addralign: 4 0x1a88-0x1a8c (4)
0x1a80| 10 00 00 00| ....| entsize: 16 0x1a8c-0x1a90 (4)
| | | [3]{}: section_header 0x1c0-0x1ab8 (6392)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x1c0-0x265 (165)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_registerTMCloneTable\x00__cxa_finalize\x00__deregister_frame_info\x00__register_frame_info\x00libbbb_bbb\x00puts\x00libc.musl-armhf.so.1\x00" 0x1c0-0x265 (165)
* |until 0x264.7 (165) | |
0x1a90|2d 00 00 00 |-... | name: ".dynstr" (45) 0x1a90-0x1a94 (4)
0x1a90| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1a94-0x1a98 (4)
@ -1769,7 +1769,7 @@ $ fq -d elf dv libbbb.so
0x1e40| 04 00 00 00 | .... | addralign: 4 0x1e48-0x1e4c (4)
0x1e40| 10 00 00 00| ....| entsize: 16 0x1e4c-0x1e50 (4)
| | | [27]{}: section_header 0x1770-0x1e78 (1800)
0x1770|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00crtstuff.c\x00$d\x00all_implied_fbi..." 0x1770-0x1912 (418)
0x1770|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00crtstuff.c\x00$d\x00all_implied_fbits\x00deregister_tm_clones\x00__do_global_dtors_aux\x00completed.1\x00__do_global_dtors_aux_fini_array_entry\x00frame_dummy\x00object.0\x00__frame_dummy_init_array_entry\x00libbbb.c\x00__FRAME_END__\x00_DYNAMIC\x00__TMC_END__\x00__dso_handle\x00_GLOBAL_OFFSET_TABLE_\x00puts\x00__cxa_finalize\x00_init\x00__deregister_frame_info\x00_ITM_registerTMCloneTable\x00_ITM_deregisterTMCloneTable\x00_fini\x00libbbb_bbb\x00__register_frame_info\x00" 0x1770-0x1912 (418)
* |until 0x1911.7 (418) | |
0x1e50|09 00 00 00 |.... | name: ".strtab" (9) 0x1e50-0x1e54 (4)
0x1e50| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1e54-0x1e58 (4)
@ -1796,7 +1796,7 @@ $ fq -d elf dv libbbb.so
0x1e70|01 00 00 00 |.... | addralign: 1 0x1e70-0x1e74 (4)
0x1e70| 00 00 00 00 | .... | entsize: 0 0x1e74-0x1e78 (4)
| | | [28]{}: section_header 0x1912-0x1ea0 (1422)
0x1910| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 0x1912-0x1a15 (259)
0x1910| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel.dyn\x00.rel.plt\x00.init\x00.text\x00.fini\x00.rodata\x00.eh_frame\x00.init_array\x00.fini_array\x00.dynamic\x00.got\x00.data\x00.bss\x00.comment\x00.ARM.attributes\x00.debug_aranges\x00.debug_info\x00.debug_abbrev\x00.debug_line\x00.debug_str\x00.debug_ranges\x00" 0x1912-0x1a15 (259)
0x1920|61 62 00 2e 73 68 73 74 72 74 61 62 00 2e 67 6e|ab..shstrtab..gn|
* |until 0x1a14.7 (259) | |
0x1e70| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x1e78-0x1e7c (4)

View File

@ -6,7 +6,7 @@ package fit
import (
"embed"
"fmt"
"sort"
"slices"
"github.com/wader/fq/format"
"github.com/wader/fq/format/fit/mappers"
@ -344,7 +344,7 @@ func fitDecodeDataMessage(d *decode.D, drc *dataRecordContext, lmfd localFieldDe
keys[i] = int(k)
i++
}
sort.Ints(keys)
slices.Sort(keys)
isDevDep := isDevMap[drc.localMessageType]

View File

@ -9,7 +9,7 @@ import (
"fmt"
"github.com/wader/fq/format"
"github.com/wader/fq/internal/mathex"
"github.com/wader/fq/internal/mathx"
"github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
@ -65,7 +65,7 @@ func flacDecode(d *decode.D) any {
samplesInFrame := ffo.Samples
if streamTotalSamples > 0 {
samplesInFrame = mathex.Min(streamTotalSamples-streamDecodedSamples, ffo.Samples)
samplesInFrame = mathx.Min(streamTotalSamples-streamDecodedSamples, ffo.Samples)
}
frameStreamSamplesBuf := ffo.SamplesBuf[0 : samplesInFrame*uint64(ffo.Channels*ffo.BitsPerSample/8)]
framesNDecodedSamples += ffo.Samples

View File

@ -5,7 +5,7 @@ import (
"math/bits"
"github.com/wader/fq/format"
"github.com/wader/fq/internal/mathex"
"github.com/wader/fq/internal/mathx"
"github.com/wader/fq/pkg/checksum"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
@ -478,7 +478,7 @@ func frameDecode(d *decode.D) any {
for j := 0; j < count; j++ {
high := d.Unary(0)
low := d.U(riceParameter)
samples[n] = mathex.ZigZag[uint64, int64](high<<riceParameter | low)
samples[n] = mathx.ZigZag[uint64, int64](high<<riceParameter | low)
n++
}
samplesStop := d.Pos()

View File

@ -45,17 +45,17 @@ type Probe_Args_In struct {
var (
Image = &decode.Group{Name: "image"}
Probe = &decode.Group{Name: "probe", DefaultInArg: Probe_In{}}
Probe_Args = &decode.Group{Name: "probe_args", DefaultInArg: Probe_Args_In{}}
Link_Frame = &decode.Group{Name: "link_frame", DefaultInArg: Link_Frame_In{}} // ex: ethernet
INET_Packet = &decode.Group{Name: "inet_packet", DefaultInArg: INET_Packet_In{}} // ex: ipv4
IP_Packet = &decode.Group{Name: "ip_packet", DefaultInArg: INET_Packet_In{}} // ex: tcp
Link_Frame = &decode.Group{Name: "link_frame", DefaultInArg: Link_Frame_In{}} // ex: ethernet
MP3_Frame_Tags = &decode.Group{Name: "mp3_frame_tags"}
Probe = &decode.Group{Name: "probe", DefaultInArg: Probe_In{}}
Probe_Args = &decode.Group{Name: "probe_args", DefaultInArg: Probe_Args_In{}}
TCP_Stream = &decode.Group{Name: "tcp_stream", DefaultInArg: TCP_Stream_In{}} // ex: http
UDP_Payload = &decode.Group{Name: "udp_payload", DefaultInArg: UDP_Payload_In{}} // ex: dns
MP3_Frame_Tags = &decode.Group{Name: "mp3_frame_tags"}
Bytes = &decode.Group{Name: "bytes"}
Bits = &decode.Group{Name: "bits"}
Bytes = &decode.Group{Name: "bytes"}
AAC_Frame = &decode.Group{Name: "aac_frame"}
ADTS = &decode.Group{Name: "adts"}
@ -83,7 +83,6 @@ var (
Bitcoin_Block = &decode.Group{Name: "bitcoin_block"}
Bitcoin_Script = &decode.Group{Name: "bitcoin_script"}
Bitcoin_Transaction = &decode.Group{Name: "bitcoin_transaction"}
Opentimestamps = &decode.Group{Name: "opentimestamps"}
Bplist = &decode.Group{Name: "bplist"}
BSD_Loopback_Frame = &decode.Group{Name: "bsd_loopback_frame"}
BSON = &decode.Group{Name: "bson"}
@ -123,6 +122,7 @@ var (
ID3v2 = &decode.Group{Name: "id3v2"}
IPv4Packet = &decode.Group{Name: "ipv4_packet"}
IPv6Packet = &decode.Group{Name: "ipv6_packet"}
JP2C = &decode.Group{Name: "jp2c"}
JPEG = &decode.Group{Name: "jpeg"}
JSON = &decode.Group{Name: "json"}
JSONL = &decode.Group{Name: "jsonl"}
@ -142,13 +142,15 @@ var (
MP4 = &decode.Group{Name: "mp4"}
MPEG_ASC = &decode.Group{Name: "mpeg_asc"}
MPEG_ES = &decode.Group{Name: "mpeg_es"}
MPES_PES = &decode.Group{Name: "mpeg_pes"}
MPEG_PES_Packet = &decode.Group{Name: "mpeg_pes_packet"}
MPEG_SPU = &decode.Group{Name: "mpeg_spu"}
MPEG_TS = &decode.Group{Name: "mpeg_ts"}
MPES_PES = &decode.Group{Name: "mpeg_pes"}
MsgPack = &decode.Group{Name: "msgpack"}
NES = &decode.Group{Name: "nes"}
Ogg = &decode.Group{Name: "ogg"}
Ogg_Page = &decode.Group{Name: "ogg_page"}
Opentimestamps = &decode.Group{Name: "opentimestamps"}
Opus_Packet = &decode.Group{Name: "opus_packet"}
PCAP = &decode.Group{Name: "pcap"}
PCAPNG = &decode.Group{Name: "pcapng"}

View File

@ -114,7 +114,7 @@ func gzipDecodeMember(d *decode.D) bitio.ReaderAtSeeker {
readCompressedSize, uncompressedBR, err =
d.FieldReaderRange("uncompressed", d.Pos(), d.BitsLeft(), rFn)
if err != nil {
d.IOPanic(err, "TryFieldReaderRange")
d.IOPanic(err, "uncompressed", "FieldReaderRange")
}
d.FieldRawLen("compressed", readCompressedSize)
crc32W := crc32.NewIEEE()
@ -149,7 +149,7 @@ func gzipDecode(d *decode.D) any {
cbr, err := bitio.NewMultiReader(brs...)
if err != nil {
d.IOPanic(err, "NewMultiReader")
d.IOPanic(err, "members", "NewMultiReader")
}
dv, _, _ := d.TryFieldFormatBitBuf("uncompressed", cbr, &probeGroup, format.Probe_In{})
if dv == nil {

View File

@ -5,9 +5,10 @@ package icc
import (
"github.com/wader/fq/format"
"github.com/wader/fq/internal/mathex"
"github.com/wader/fq/internal/mathx"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
"github.com/wader/fq/pkg/scalar"
)
func init() {
@ -70,7 +71,7 @@ func multiLocalizedUnicodeType(tagStart int64, d *decode.D) {
}
var typeToDecode = map[string]func(tagStart int64, d *decode.D){
"XYZ ": xyzType,
"XYZ": xyzType,
"text": textType,
"para": paraType,
"desc": descType,
@ -111,13 +112,13 @@ func iccProfileDecode(d *decode.D) any {
d.FramedFn(int64(size)*8, func(d *decode.D) {
d.FieldStruct("header", func(d *decode.D) {
d.FieldU32("size")
d.FieldUTF8NullFixedLen("cmm_type_signature", 4)
d.FieldUTF8NullFixedLen("cmm_type_signature", 4, scalar.ActualTrimSpace)
d.FieldUintFn("version_major", decodeBCDU8)
d.FieldUintFn("version_minor", decodeBCDU8)
d.FieldU16("version_reserved")
d.FieldUTF8NullFixedLen("device_class_signature", 4)
d.FieldUTF8NullFixedLen("color_space", 4)
d.FieldUTF8NullFixedLen("connection_space", 4)
d.FieldUTF8NullFixedLen("device_class_signature", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("color_space", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("connection_space", 4, scalar.ActualTrimSpace)
d.FieldStruct("timestamp", func(d *decode.D) {
d.FieldU16("year")
d.FieldU16("month")
@ -127,16 +128,16 @@ func iccProfileDecode(d *decode.D) any {
d.FieldU16("seconds")
})
d.FieldUTF8NullFixedLen("file_signature", 4)
d.FieldUTF8NullFixedLen("primary_platform", 4)
d.FieldUTF8NullFixedLen("file_signature", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("primary_platform", 4, scalar.ActualTrimSpace)
d.FieldU32("flags")
d.FieldUTF8NullFixedLen("device_manufacturer", 4)
d.FieldUTF8NullFixedLen("device_model", 4)
d.FieldUTF8NullFixedLen("device_attribute", 8)
d.FieldUTF8NullFixedLen("render_intent", 4)
d.FieldUTF8NullFixedLen("xyz_illuminant", 12)
d.FieldUTF8NullFixedLen("profile_creator_signature", 4)
d.FieldUTF8NullFixedLen("profile_id", 16)
d.FieldUTF8NullFixedLen("device_manufacturer", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("device_model", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("device_attribute", 8, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("render_intent", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("xyz_illuminant", 12, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("profile_creator_signature", 4, scalar.ActualTrimSpace)
d.FieldUTF8NullFixedLen("profile_id", 16, scalar.ActualTrimSpace)
d.FieldRawLen("reserved", 28*8, d.BitBufIsZero())
})
@ -145,13 +146,13 @@ func iccProfileDecode(d *decode.D) any {
d.FieldArray("table", func(d *decode.D) {
for i := uint64(0); i < tagCount; i++ {
d.FieldStruct("element", func(d *decode.D) {
d.FieldUTF8NullFixedLen("signature", 4)
d.FieldUTF8NullFixedLen("signature", 4, scalar.ActualTrimSpace)
offset := d.FieldU32("offset")
size := d.FieldU32("size")
d.RangeFn(int64(offset)*8, int64(size)*8, func(d *decode.D) {
tagStart := d.Pos()
typ := d.FieldUTF8NullFixedLen("type", 4)
typ := d.FieldUTF8NullFixedLen("type", 4, scalar.ActualTrimSpace)
d.FieldU32("reserved")
if fn, ok := typeToDecode[typ]; ok {
@ -166,7 +167,7 @@ func iccProfileDecode(d *decode.D) any {
// was. instead add alignment after if offset+size does not align and to be sure clamp it if outside buffer.
alignStart := int64(offset) + int64(size)
alignBytes := (4 - (int64(offset)+int64(size))%4) % 4
alignBytes = mathex.Min(d.Len()/8-alignStart, alignBytes)
alignBytes = mathx.Min(d.Len()/8-alignStart, alignBytes)
if alignBytes != 0 {
d.RangeFn(alignStart*8, alignBytes*8, func(d *decode.D) {
d.FieldRawLen("alignment", d.BitsLeft())

View File

@ -8,8 +8,8 @@ $ fq -d icc_profile dv sRGB2014.icc
0x000| 00 | . | version_minor: 0 0x9-0xa (1)
0x000| 00 00 | .. | version_reserved: 0 0xa-0xc (2)
0x000| 6d 6e 74 72| mntr| device_class_signature: "mntr" 0xc-0x10 (4)
0x010|52 47 42 20 |RGB | color_space: "RGB " 0x10-0x14 (4)
0x010| 58 59 5a 20 | XYZ | connection_space: "XYZ " 0x14-0x18 (4)
0x010|52 47 42 20 |RGB | color_space: "RGB" 0x10-0x14 (4)
0x010| 58 59 5a 20 | XYZ | connection_space: "XYZ" 0x14-0x18 (4)
| | | timestamp{}: 0x18-0x24 (12)
0x010| 07 df | .. | year: 2015 0x18-0x1a (2)
0x010| 00 02 | .. | month: 2 0x1a-0x1c (2)
@ -55,7 +55,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x090|62 58 59 5a |bXYZ | signature: "bXYZ" 0x90-0x94 (4)
0x090| 00 00 01 a8 | .... | offset: 424 0x94-0x98 (4)
0x090| 00 00 00 14 | .... | size: 20 0x98-0x9c (4)
0x1a0| 58 59 5a 20 | XYZ | type: "XYZ " 0x1a8-0x1ac (4)
0x1a0| 58 59 5a 20 | XYZ | type: "XYZ" 0x1a8-0x1ac (4)
0x1a0| 00 00 00 00| ....| reserved: 0 0x1ac-0x1b0 (4)
0x1b0|00 00 24 a0 |..$. | x: 0.14306640625 0x1b0-0x1b4 (4)
0x1b0| 00 00 0f 84 | .... | y: 0.06060791015625 0x1b4-0x1b8 (4)
@ -109,7 +109,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x0c0| 67 58 59 5a| gXYZ| signature: "gXYZ" 0xcc-0xd0 (4)
0x0d0|00 00 0a 50 |...P | offset: 2640 0xd0-0xd4 (4)
0x0d0| 00 00 00 14 | .... | size: 20 0xd4-0xd8 (4)
0xa50|58 59 5a 20 |XYZ | type: "XYZ " 0xa50-0xa54 (4)
0xa50|58 59 5a 20 |XYZ | type: "XYZ" 0xa50-0xa54 (4)
0xa50| 00 00 00 00 | .... | reserved: 0 0xa54-0xa58 (4)
0xa50| 00 00 62 99 | ..b. | x: 0.3851470947265625 0xa58-0xa5c (4)
0xa50| 00 00 b7 85| ....| y: 0.7168731689453125 0xa5c-0xa60 (4)
@ -118,7 +118,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x0d0| 6c 75 6d 69 | lumi | signature: "lumi" 0xd8-0xdc (4)
0x0d0| 00 00 0a 64| ...d| offset: 2660 0xdc-0xe0 (4)
0x0e0|00 00 00 14 |.... | size: 20 0xe0-0xe4 (4)
0xa60| 58 59 5a 20 | XYZ | type: "XYZ " 0xa64-0xa68 (4)
0xa60| 58 59 5a 20 | XYZ | type: "XYZ" 0xa64-0xa68 (4)
0xa60| 00 00 00 00 | .... | reserved: 0 0xa68-0xa6c (4)
0xa60| 00 00 00 00| ....| x: 0 0xa6c-0xa70 (4)
0xa70|00 50 00 00 |.P.. | y: 80 0xa70-0xa74 (4)
@ -135,7 +135,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x0f0|62 6b 70 74 |bkpt | signature: "bkpt" 0xf0-0xf4 (4)
0x0f0| 00 00 0a 9c | .... | offset: 2716 0xf4-0xf8 (4)
0x0f0| 00 00 00 14 | .... | size: 20 0xf8-0xfc (4)
0xa90| 58 59 5a 20| XYZ | type: "XYZ " 0xa9c-0xaa0 (4)
0xa90| 58 59 5a 20| XYZ | type: "XYZ" 0xa9c-0xaa0 (4)
0xaa0|00 00 00 00 |.... | reserved: 0 0xaa0-0xaa4 (4)
0xaa0| 00 00 00 9e | .... | x: 0.002410888671875 0xaa4-0xaa8 (4)
0xaa0| 00 00 00 a4 | .... | y: 0.00250244140625 0xaa8-0xaac (4)
@ -144,7 +144,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x0f0| 72 58 59 5a| rXYZ| signature: "rXYZ" 0xfc-0x100 (4)
0x100|00 00 0a b0 |.... | offset: 2736 0x100-0x104 (4)
0x100| 00 00 00 14 | .... | size: 20 0x104-0x108 (4)
0xab0|58 59 5a 20 |XYZ | type: "XYZ " 0xab0-0xab4 (4)
0xab0|58 59 5a 20 |XYZ | type: "XYZ" 0xab0-0xab4 (4)
0xab0| 00 00 00 00 | .... | reserved: 0 0xab4-0xab8 (4)
0xab0| 00 00 6f a2 | ..o. | x: 0.436065673828125 0xab8-0xabc (4)
0xab0| 00 00 38 f5| ..8.| y: 0.2224884033203125 0xabc-0xac0 (4)
@ -153,7 +153,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x100| 74 65 63 68 | tech | signature: "tech" 0x108-0x10c (4)
0x100| 00 00 0a c4| ....| offset: 2756 0x10c-0x110 (4)
0x110|00 00 00 0c |.... | size: 12 0x110-0x114 (4)
0xac0| 73 69 67 20 | sig | type: "sig " 0xac4-0xac8 (4)
0xac0| 73 69 67 20 | sig | type: "sig" 0xac4-0xac8 (4)
0xac0| 00 00 00 00 | .... | reserved: 0 0xac8-0xacc (4)
0xac0| 43 52 54 20| CRT | data: raw bits 0xacc-0xad0 (4)
| | | [12]{}: element 0x114-0xb58 (2628)
@ -180,7 +180,7 @@ $ fq -d icc_profile dv sRGB2014.icc
0x120|77 74 70 74 |wtpt | signature: "wtpt" 0x120-0x124 (4)
0x120| 00 00 0b 58 | ...X | offset: 2904 0x124-0x128 (4)
0x120| 00 00 00 14 | .... | size: 20 0x128-0x12c (4)
0xb50| 58 59 5a 20 | XYZ | type: "XYZ " 0xb58-0xb5c (4)
0xb50| 58 59 5a 20 | XYZ | type: "XYZ" 0xb58-0xb5c (4)
0xb50| 00 00 00 00| ....| reserved: 0 0xb5c-0xb60 (4)
0xb60|00 00 f6 d6 |.... | x: 0.964202880859375 0xb60-0xb64 (4)
0xb60| 00 01 00 00 | .... | y: 1 0xb64-0xb68 (4)

View File

@ -302,7 +302,7 @@ func textNullLenFn(encoding int, notFoundFixedBytes int) func(d *decode.D) strin
func(v uint64) bool { return v == 0 },
)
if err != nil {
d.IOPanic(err, "textNullLenFn")
d.IOPanic(err, "", "textNullLenFn")
}
if offset < 0 {
if notFoundFixedBytes < 0 {

View File

@ -5,7 +5,7 @@ import (
"net"
"github.com/wader/fq/format"
"github.com/wader/fq/internal/bitioex"
"github.com/wader/fq/internal/bitiox"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
"github.com/wader/fq/pkg/scalar"
@ -105,7 +105,7 @@ var hopByHopTypeNames = scalar.UintMapSymStr{
var mapUToIPv6Sym = scalar.BitBufFn(func(s scalar.BitBuf) (scalar.BitBuf, error) {
b := &bytes.Buffer{}
if _, err := bitioex.CopyBits(b, s.Actual); err != nil {
if _, err := bitiox.CopyBits(b, s.Actual); err != nil {
return s, err
}
s.Sym = net.IP(b.Bytes()).String()

144
format/jpeg/jp2c.go Normal file
View File

@ -0,0 +1,144 @@
package jpeg
import (
"github.com/wader/fq/format"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
"github.com/wader/fq/pkg/scalar"
)
func init() {
interp.RegisterFormat(
format.JP2C,
&decode.Format{
Description: "JPEG 2000 codestream",
Groups: []*decode.Group{format.Probe, format.Image},
DecodeFn: jp2cDecode,
RootName: "segments",
RootArray: true,
})
}
const (
JP2_SOC = 0xff_4f /* start of codestream */
JP2_SOT = 0xff_90 /* start of tile */
JP2_SOD = 0xff_93 /* start of data */
JP2_EOC = 0xff_d9 /* end of codestream */
/* fixed information segment */
JP2_SIZ = 0xff_51 /* image and tile size */
/* functional segments */
JP2_COD = 0xff_52 /* coding style default */
JP2_COC = 0xff_53 /* coding style component */
JP2_RGN = 0xff_5e /* region of interest */
JP2_QCD = 0xff_5c /* quantization default */
JP2_QCC = 0xff_5d /* quantization component */
JP2_POC = 0xff_5f /* progression order change */
/* pointer segments */
JP2_TLM = 0xff_55 /* tile-part lengths */
JP2_PLM = 0xff_57 /* packet length (main header) */
JP2_PLT = 0xff_58 /* packet length (tile-part header) */
JP2_PPM = 0xff_60 /* packed packet headers (main header) */
JP2_PPT = 0xff_61 /* packet packet headers (tile-part header) */
/* bitstream internal markers and segments */
JP2_SOP = 0xff_91 /* start of packet */
JP2_EPH = 0xff_92 /* end of packet header */
/* informational segments */
JP2_CRG = 0xff_63 /* component registration */
JP2_COM = 0xff_64 /* comment */
)
var jp2Markers = scalar.UintMap{
JP2_SOC: {Sym: "soc", Description: "Start of codestream"},
JP2_SOT: {Sym: "sot", Description: "Start of tile"},
JP2_SOD: {Sym: "sod", Description: "Start of data"},
JP2_EOC: {Sym: "eoc", Description: "End of codestream"},
JP2_SIZ: {Sym: "siz", Description: "Image and tile size"},
JP2_COD: {Sym: "cod", Description: "Coding style default"},
JP2_COC: {Sym: "coc", Description: "Coding style component"},
JP2_RGN: {Sym: "rgn", Description: "Region of interest"},
JP2_QCD: {Sym: "qcd", Description: "Quantization default"},
JP2_QCC: {Sym: "qcc", Description: "Quantization component"},
JP2_POC: {Sym: "poc", Description: "Progression order change"},
JP2_TLM: {Sym: "tlm", Description: "Tile-part lengths"},
JP2_PLM: {Sym: "plm", Description: "Packet length (main header)"},
JP2_PLT: {Sym: "plt", Description: "Packet length (tile-part header)"},
JP2_PPM: {Sym: "ppm", Description: "Packed packet headers (main header)"},
JP2_PPT: {Sym: "ppt", Description: "Packet packet headers (tile-part header)"},
JP2_SOP: {Sym: "sop", Description: "Start of packet"},
JP2_EPH: {Sym: "eph", Description: "End of packet header"},
JP2_CRG: {Sym: "crg", Description: "Component registration"},
JP2_COM: {Sym: "com", Description: "Comment"},
}
func jp2cDecode(d *decode.D) any {
if d.PeekUintBits(16) != JP2_SOC {
d.Fatalf("no SOC marker")
}
seenSOC := false
seenSIZ := false
seenEOC := false
for !seenEOC && !d.End() {
d.FieldStruct("segment", func(d *decode.D) {
marker := d.FieldU16("marker", jp2Markers, scalar.UintHex)
switch marker {
case JP2_SOC:
// zero length
seenSOC = true
return
case JP2_SOD:
l, _ := d.PeekFind(16, 8, d.BitsLeft(), func(v uint64) bool {
return v == JP2_SOT || v == JP2_EOC
})
d.FieldRawLen("data", l)
case JP2_SOT:
d.FieldU16("l_sot")
d.FieldU16("i_sot")
d.FieldU32("p_sot")
d.FieldU8("tp_sot")
d.FieldU8("tn_sot")
case JP2_SIZ:
seenSIZ = true
d.FieldU16("l_siz")
d.FieldU16("r_siz")
d.FieldU32("x_siz")
d.FieldU32("y_siz")
d.FieldU32("xo_siz")
d.FieldU32("yo_siz")
d.FieldU32("xt_siz")
d.FieldU32("yt_siz")
d.FieldU32("xto_siz")
d.FieldU32("yto_siz")
cSiz := d.FieldU16("c_siz")
d.FieldArray("components", func(d *decode.D) {
for i := 0; i < int(cSiz); i++ {
d.FieldStruct("component", func(d *decode.D) {
d.FieldU8("s_sizi")
d.FieldU8("xr_sizi")
d.FieldU8("yr_sizi")
})
}
})
case JP2_COM:
length := d.FieldU16("length")
d.FieldU16("r_cme")
d.FieldUTF8("data", int(length-4))
case JP2_EOC:
// zero length
seenEOC = true
return
default:
length := d.FieldU16("length")
d.FieldRawLen("data", int64(length-2)*8)
}
})
}
if !(seenSOC && seenSIZ && seenEOC) {
d.Fatalf("SOC, SIZ or EOC marker not found")
}
return nil
}

View File

@ -124,7 +124,7 @@ var markers = scalar.UintMap{
RST6: {Sym: "rst6", Description: "Restart with modulo 8 count 6"},
RST7: {Sym: "rst7", Description: "Restart with modulo 8 count 7"},
SOI: {Sym: "soi", Description: "Start of image"},
EOI: {Sym: "eoi", Description: "End of image true"},
EOI: {Sym: "eoi", Description: "End of image"},
SOS: {Sym: "sos", Description: "Start of scan"},
DQT: {Sym: "dqt", Description: "Define quantization table(s)"},
DNL: {Sym: "dnl", Description: "Define number of lines"},
@ -262,6 +262,29 @@ func jpegDecode(d *decode.D) any {
}
})
})
case DHT:
lH := int64(d.FieldU16("lh"))
d.FramedFn(lH*8-16, func(d *decode.D) {
d.FieldArray("hs", func(d *decode.D) {
for d.NotEnd() {
d.FieldStruct("h", func(d *decode.D) {
d.FieldU4("tc")
d.FieldU4("th")
hK := uint64(0)
hV := uint64(0)
d.FieldArrayLoop("l", func() bool { return hK < 16 }, func(d *decode.D) {
hV += d.FieldU8("l")
hK++
})
hK = 0
d.FieldArrayLoop("v", func() bool { return hK < hV }, func(d *decode.D) {
d.FieldU8("v")
hK++
})
})
}
})
})
case RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7:
inECD = true
case TEM:

View File

@ -109,15 +109,57 @@ $ fq -d jpeg dv 4x4.jpg
| | | [4]{}: marker 0x66-0x7c (22)
0x60| ff | . | prefix: raw bits (valid) 0x66-0x67 (1)
0x60| c4 | . | code: "dht" (196) (Define Huffman table(s)) 0x67-0x68 (1)
0x60| 00 14 | .. | length: 20 0x68-0x6a (2)
0x60| 00 01 00 00 00 00| ......| data: raw bits 0x6a-0x7c (18)
0x70|00 00 00 00 00 00 00 00 00 00 00 08 |............ |
0x60| 00 14 | .. | lh: 20 0x68-0x6a (2)
| | | hs[0:1]: 0x6a-0x7c (18)
| | | [0]{}: h 0x6a-0x7c (18)
0x60| 00 | . | tc: 0 0x6a-0x6a.4 (0.4)
0x60| 00 | . | th: 0 0x6a.4-0x6b (0.4)
| | | l[0:16]: 0x6b-0x7b (16)
0x60| 01 | . | [0]: 1 l 0x6b-0x6c (1)
0x60| 00 | . | [1]: 0 l 0x6c-0x6d (1)
0x60| 00 | . | [2]: 0 l 0x6d-0x6e (1)
0x60| 00 | . | [3]: 0 l 0x6e-0x6f (1)
0x60| 00| .| [4]: 0 l 0x6f-0x70 (1)
0x70|00 |. | [5]: 0 l 0x70-0x71 (1)
0x70| 00 | . | [6]: 0 l 0x71-0x72 (1)
0x70| 00 | . | [7]: 0 l 0x72-0x73 (1)
0x70| 00 | . | [8]: 0 l 0x73-0x74 (1)
0x70| 00 | . | [9]: 0 l 0x74-0x75 (1)
0x70| 00 | . | [10]: 0 l 0x75-0x76 (1)
0x70| 00 | . | [11]: 0 l 0x76-0x77 (1)
0x70| 00 | . | [12]: 0 l 0x77-0x78 (1)
0x70| 00 | . | [13]: 0 l 0x78-0x79 (1)
0x70| 00 | . | [14]: 0 l 0x79-0x7a (1)
0x70| 00 | . | [15]: 0 l 0x7a-0x7b (1)
| | | v[0:1]: 0x7b-0x7c (1)
0x70| 08 | . | [0]: 8 v 0x7b-0x7c (1)
| | | [5]{}: marker 0x7c-0x92 (22)
0x70| ff | . | prefix: raw bits (valid) 0x7c-0x7d (1)
0x70| c4 | . | code: "dht" (196) (Define Huffman table(s)) 0x7d-0x7e (1)
0x70| 00 14| ..| length: 20 0x7e-0x80 (2)
0x80|10 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| data: raw bits 0x80-0x92 (18)
0x90|00 00 |.. |
0x70| 00 14| ..| lh: 20 0x7e-0x80 (2)
| | | hs[0:1]: 0x80-0x92 (18)
| | | [0]{}: h 0x80-0x92 (18)
0x80|10 |. | tc: 1 0x80-0x80.4 (0.4)
0x80|10 |. | th: 0 0x80.4-0x81 (0.4)
| | | l[0:16]: 0x81-0x91 (16)
0x80| 01 | . | [0]: 1 l 0x81-0x82 (1)
0x80| 00 | . | [1]: 0 l 0x82-0x83 (1)
0x80| 00 | . | [2]: 0 l 0x83-0x84 (1)
0x80| 00 | . | [3]: 0 l 0x84-0x85 (1)
0x80| 00 | . | [4]: 0 l 0x85-0x86 (1)
0x80| 00 | . | [5]: 0 l 0x86-0x87 (1)
0x80| 00 | . | [6]: 0 l 0x87-0x88 (1)
0x80| 00 | . | [7]: 0 l 0x88-0x89 (1)
0x80| 00 | . | [8]: 0 l 0x89-0x8a (1)
0x80| 00 | . | [9]: 0 l 0x8a-0x8b (1)
0x80| 00 | . | [10]: 0 l 0x8b-0x8c (1)
0x80| 00 | . | [11]: 0 l 0x8c-0x8d (1)
0x80| 00 | . | [12]: 0 l 0x8d-0x8e (1)
0x80| 00 | . | [13]: 0 l 0x8e-0x8f (1)
0x80| 00| .| [14]: 0 l 0x8f-0x90 (1)
0x90|00 |. | [15]: 0 l 0x90-0x91 (1)
| | | v[0:1]: 0x91-0x92 (1)
0x90| 00 | . | [0]: 0 v 0x91-0x92 (1)
| | | [6]{}: marker 0x92-0x9c (10)
0x90| ff | . | prefix: raw bits (valid) 0x92-0x93 (1)
0x90| da | . | code: "sos" (218) (Start of scan) 0x93-0x94 (1)
@ -135,4 +177,4 @@ $ fq -d jpeg dv 4x4.jpg
0x90| 3f bf | ?. | [7]: raw bits entropy_coded_data 0x9c-0x9e (2)
| | | [8]{}: marker 0x9e-0xa0 (2)
0x90| ff | . | prefix: raw bits (valid) 0x9e-0x9f (1)
0x90| d9| .| code: "eoi" (217) (End of image true) 0x9f-0xa0 (1)
0x90| d9| .| code: "eoi" (217) (End of image) 0x9f-0xa0 (1)

BIN
format/jpeg/testdata/jp2c_3c.jp2 vendored Normal file

Binary file not shown.

129
format/jpeg/testdata/jp2c_3c.jp2.fqtest vendored Normal file
View File

@ -0,0 +1,129 @@
# jp2c with 3 components
# gm convert -size 4x4 'gradient:#ff00ff-#00ff00' -colors 254 jp2c_3c.jp2
$ fq dv jp2c_3c.jp2
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: jp2c_3c.jp2 (mp4) 0x0-0x18a (394)
| | | boxes[0:4]: 0x0-0x18a (394)
| | | [0]{}: box 0x0-0xc (12)
0x000|00 00 00 0c |.... | size: 12 0x0-0x4 (4)
0x000| 6a 50 20 20 | jP | type: "jP" (JPEG 2000 Signature) 0x4-0x8 (4)
0x000| 0d 0a 87 0a | .... | signature: raw bits (valid) 0x8-0xc (4)
| | | [1]{}: box 0xc-0x20 (20)
0x000| 00 00 00 14| ....| size: 20 0xc-0x10 (4)
0x010|66 74 79 70 |ftyp | type: "ftyp" (File type and compatibility) 0x10-0x14 (4)
0x010| 6a 70 32 20 | jp2 | major_brand: "jp2" 0x14-0x18 (4)
0x010| 00 00 00 00 | .... | minor_version: 0 0x18-0x1c (4)
| | | brands[0:1]: 0x1c-0x20 (4)
0x010| 6a 70 32 20| jp2 | [0]: "jp2" brand 0x1c-0x20 (4)
| | | [2]{}: box 0x20-0x4d (45)
0x020|00 00 00 2d |...- | size: 45 0x20-0x24 (4)
0x020| 6a 70 32 68 | jp2h | type: "jp2h" (Header) 0x24-0x28 (4)
| | | boxes[0:2]: 0x28-0x4d (37)
| | | [0]{}: box 0x28-0x3e (22)
0x020| 00 00 00 16 | .... | size: 22 0x28-0x2c (4)
0x020| 69 68 64 72| ihdr| type: "ihdr" (Image Header) 0x2c-0x30 (4)
0x030|00 00 00 04 |.... | width: 4 0x30-0x34 (4)
0x030| 00 00 00 04 | .... | height: 4 0x34-0x38 (4)
0x030| 00 03 | .. | nc: 3 0x38-0x3a (2)
0x030| 0f | . | bpc: 16 0x3a-0x3b (1)
0x030| 07 | . | c: "jpeg_2000" (7) 0x3b-0x3c (1)
0x030| 00 | . | unk_c: 0 0x3c-0x3d (1)
0x030| 00 | . | ipr: 0 0x3d-0x3e (1)
| | | [1]{}: box 0x3e-0x4d (15)
0x030| 00 00| ..| size: 15 0x3e-0x42 (4)
0x040|00 0f |.. |
0x040| 63 6f 6c 72 | colr | type: "colr" (Specifies the colourspace of the image) 0x42-0x46 (4)
0x040| 01 00 00 00 | .... | parameter_type: "\x01\x00\x00\x00" 0x46-0x4a (4)
0x040| 00 00 10 | ... | data: raw bits 0x4a-0x4d (3)
| | | [3]{}: box 0x4d-0x18a (317)
0x040| 00 00 00| ...| size: 0 (Rest of file) 0x4d-0x51 (4)
0x050|00 |. |
0x050| 6a 70 32 63 | jp2c | type: "jp2c" (JPEG 2000 contiguous codestream) 0x51-0x55 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| segments[0:13]: (jp2c) 0x55-0x18a (309)
| | | [0]{}: segment 0x55-0x57 (2)
0x050| ff 4f | .O | marker: "soc" (0xff4f) (Start of codestream) 0x55-0x57 (2)
| | | [1]{}: segment 0x57-0x88 (49)
0x050| ff 51 | .Q | marker: "siz" (0xff51) (Image and tile size) 0x57-0x59 (2)
0x050| 00 2f | ./ | l_siz: 47 0x59-0x5b (2)
0x050| 00 00 | .. | r_siz: 0 0x5b-0x5d (2)
0x050| 00 00 00| ...| x_siz: 4 0x5d-0x61 (4)
0x060|04 |. |
0x060| 00 00 00 04 | .... | y_siz: 4 0x61-0x65 (4)
0x060| 00 00 00 00 | .... | xo_siz: 0 0x65-0x69 (4)
0x060| 00 00 00 00 | .... | yo_siz: 0 0x69-0x6d (4)
0x060| 00 00 00| ...| xt_siz: 4 0x6d-0x71 (4)
0x070|04 |. |
0x070| 00 00 00 04 | .... | yt_siz: 4 0x71-0x75 (4)
0x070| 00 00 00 00 | .... | xto_siz: 0 0x75-0x79 (4)
0x070| 00 00 00 00 | .... | yto_siz: 0 0x79-0x7d (4)
0x070| 00 03 | .. | c_siz: 3 0x7d-0x7f (2)
| | | components[0:3]: 0x7f-0x88 (9)
| | | [0]{}: component 0x7f-0x82 (3)
0x070| 0f| .| s_sizi: 15 0x7f-0x80 (1)
0x080|01 |. | xr_sizi: 1 0x80-0x81 (1)
0x080| 01 | . | yr_sizi: 1 0x81-0x82 (1)
| | | [1]{}: component 0x82-0x85 (3)
0x080| 0f | . | s_sizi: 15 0x82-0x83 (1)
0x080| 01 | . | xr_sizi: 1 0x83-0x84 (1)
0x080| 01 | . | yr_sizi: 1 0x84-0x85 (1)
| | | [2]{}: component 0x85-0x88 (3)
0x080| 0f | . | s_sizi: 15 0x85-0x86 (1)
0x080| 01 | . | xr_sizi: 1 0x86-0x87 (1)
0x080| 01 | . | yr_sizi: 1 0x87-0x88 (1)
| | | [2]{}: segment 0x88-0xac (36)
0x080| ff 64 | .d | marker: "com" (0xff64) (Comment) 0x88-0x8a (2)
0x080| 00 22 | ." | length: 34 0x8a-0x8c (2)
0x080| 00 01 | .. | r_cme: 1 0x8c-0x8e (2)
0x080| 43 72| Cr| data: "Creator: JasPer Version 2.0.33" 0x8e-0xac (30)
0x090|65 61 74 6f 72 3a 20 4a 61 73 50 65 72 20 56 65|eator: JasPer Ve|
0x0a0|72 73 69 6f 6e 20 32 2e 30 2e 33 33 |rsion 2.0.33 |
| | | [3]{}: segment 0xac-0xba (14)
0x0a0| ff 52 | .R | marker: "cod" (0xff52) (Coding style default) 0xac-0xae (2)
0x0a0| 00 0c| ..| length: 12 0xae-0xb0 (2)
0x0b0|00 00 00 01 01 05 04 04 00 01 |.......... | data: raw bits 0xb0-0xba (10)
| | | [4]{}: segment 0xba-0xcf (21)
0x0b0| ff 5c | .\ | marker: "qcd" (0xff5c) (Quantization default) 0xba-0xbc (2)
0x0b0| 00 13 | .. | length: 19 0xbc-0xbe (2)
0x0b0| 40 80| @.| data: raw bits 0xbe-0xcf (17)
0x0c0|88 88 90 88 88 90 88 88 90 88 88 90 88 88 90 |............... |
| | | [5]{}: segment 0xcf-0xe5 (22)
0x0c0| ff| .| marker: "qcc" (0xff5d) (Quantization component) 0xcf-0xd1 (2)
0x0d0|5d |] |
0x0d0| 00 14 | .. | length: 20 0xd1-0xd3 (2)
0x0d0| 01 40 80 88 88 90 88 88 90 88 88 90 88| .@...........| data: raw bits 0xd3-0xe5 (18)
0x0e0|88 90 88 88 90 |..... |
| | | [6]{}: segment 0xe5-0xfb (22)
0x0e0| ff 5d | .] | marker: "qcc" (0xff5d) (Quantization component) 0xe5-0xe7 (2)
0x0e0| 00 14 | .. | length: 20 0xe7-0xe9 (2)
0x0e0| 02 40 80 88 88 90 88| .@.....| data: raw bits 0xe9-0xfb (18)
0x0f0|88 90 88 88 90 88 88 90 88 88 90 |........... |
| | | [7]{}: segment 0xfb-0x107 (12)
0x0f0| ff 90 | .. | marker: "sot" (0xff90) (Start of tile) 0xfb-0xfd (2)
0x0f0| 00 0a | .. | l_sot: 10 0xfd-0xff (2)
0x0f0| 00| .| i_sot: 0 0xff-0x101 (2)
0x100|00 |. |
0x100| 00 00 00 8d | .... | p_sot: 141 0x101-0x105 (4)
0x100| 00 | . | tp_sot: 0 0x105-0x106 (1)
0x100| 01 | . | tn_sot: 1 0x106-0x107 (1)
| | | [8]{}: segment 0x107-0x11d (22)
0x100| ff 5d | .] | marker: "qcc" (0xff5d) (Quantization component) 0x107-0x109 (2)
0x100| 00 14 | .. | length: 20 0x109-0x10b (2)
0x100| 00 40 80 00 00| .@...| data: raw bits 0x10b-0x11d (18)
0x110|00 00 00 00 00 00 00 88 88 90 88 88 90 |............. |
| | | [9]{}: segment 0x11d-0x133 (22)
0x110| ff 5d | .] | marker: "qcc" (0xff5d) (Quantization component) 0x11d-0x11f (2)
0x110| 00| .| length: 20 0x11f-0x121 (2)
0x120|14 |. |
0x120| 01 40 80 00 00 00 00 00 00 00 00 00 88 88 90| .@.............| data: raw bits 0x121-0x133 (18)
0x130|88 88 90 |... |
| | | [10]{}: segment 0x133-0x149 (22)
0x130| ff 5d | .] | marker: "qcc" (0xff5d) (Quantization component) 0x133-0x135 (2)
0x130| 00 14 | .. | length: 20 0x135-0x137 (2)
0x130| 02 40 80 00 00 00 00 00 00| .@.......| data: raw bits 0x137-0x149 (18)
0x140|00 00 00 88 88 90 88 88 90 |......... |
| | | [11]{}: segment 0x149-0x188 (63)
0x140| ff 93 | .. | marker: "sod" (0xff93) (Start of data) 0x149-0x14b (2)
0x140| c0 00 21 07 cf| ..!..| data: raw bits 0x14b-0x188 (61)
0x150|fc 30 08 05 3f cf fc 30 08 05 3f 80 80 80 80 80|.0..?..0..?.....|
* |until 0x187.7 (61) | |
| | | [12]{}: segment 0x188-0x18a (2)
0x180| ff d9| | ..| | marker: "eoc" (0xffd9) (End of codestream) 0x188-0x18a (2)

BIN
format/jpeg/testdata/test.j2c vendored Normal file

Binary file not shown.

59
format/jpeg/testdata/test.j2c.fqtest vendored Normal file
View File

@ -0,0 +1,59 @@
# test probe
$ fq dv test.j2c
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.[0:9]: test.j2c (jp2c) 0x0-0xa4 (164)
| | | [0]{}: segment 0x0-0x2 (2)
0x00|ff 4f |.O | marker: "soc" (0xff4f) (Start of codestream) 0x0-0x2 (2)
| | | [1]{}: segment 0x2-0x2d (43)
0x00| ff 51 | .Q | marker: "siz" (0xff51) (Image and tile size) 0x2-0x4 (2)
0x00| 00 29 | .) | l_siz: 41 0x4-0x6 (2)
0x00| 00 00 | .. | r_siz: 0 0x6-0x8 (2)
0x00| 00 00 00 01 | .... | x_siz: 1 0x8-0xc (4)
0x00| 00 00 00 01| ....| y_siz: 1 0xc-0x10 (4)
0x10|00 00 00 00 |.... | xo_siz: 0 0x10-0x14 (4)
0x10| 00 00 00 00 | .... | yo_siz: 0 0x14-0x18 (4)
0x10| 00 00 00 01 | .... | xt_siz: 1 0x18-0x1c (4)
0x10| 00 00 00 01| ....| yt_siz: 1 0x1c-0x20 (4)
0x20|00 00 00 00 |.... | xto_siz: 0 0x20-0x24 (4)
0x20| 00 00 00 00 | .... | yto_siz: 0 0x24-0x28 (4)
0x20| 00 01 | .. | c_siz: 1 0x28-0x2a (2)
| | | components[0:1]: 0x2a-0x2d (3)
| | | [0]{}: component 0x2a-0x2d (3)
0x20| 0f | . | s_sizi: 15 0x2a-0x2b (1)
0x20| 01 | . | xr_sizi: 1 0x2b-0x2c (1)
0x20| 01 | . | yr_sizi: 1 0x2c-0x2d (1)
| | | [2]{}: segment 0x2d-0x51 (36)
0x20| ff 64 | .d | marker: "com" (0xff64) (Comment) 0x2d-0x2f (2)
0x20| 00| .| length: 34 0x2f-0x31 (2)
0x30|22 |" |
0x30| 00 01 | .. | r_cme: 1 0x31-0x33 (2)
0x30| 43 72 65 61 74 6f 72 3a 20 4a 61 73 50| Creator: JasP| data: "Creator: JasPer Version 2.0.33" 0x33-0x51 (30)
0x40|65 72 20 56 65 72 73 69 6f 6e 20 32 2e 30 2e 33|er Version 2.0.3|
0x50|33 |3 |
| | | [3]{}: segment 0x51-0x5f (14)
0x50| ff 52 | .R | marker: "cod" (0xff52) (Coding style default) 0x51-0x53 (2)
0x50| 00 0c | .. | length: 12 0x53-0x55 (2)
0x50| 00 00 00 01 00 05 04 04 00 01 | .......... | data: raw bits 0x55-0x5f (10)
| | | [4]{}: segment 0x5f-0x74 (21)
0x50| ff| .| marker: "qcd" (0xff5c) (Quantization default) 0x5f-0x61 (2)
0x60|5c |\ |
0x60| 00 13 | .. | length: 19 0x61-0x63 (2)
0x60| 40 80 88 88 90 88 88 90 88 88 90 88 88| @............| data: raw bits 0x63-0x74 (17)
0x70|90 88 88 90 |.... |
| | | [5]{}: segment 0x74-0x80 (12)
0x70| ff 90 | .. | marker: "sot" (0xff90) (Start of tile) 0x74-0x76 (2)
0x70| 00 0a | .. | l_sot: 10 0x76-0x78 (2)
0x70| 00 00 | .. | i_sot: 0 0x78-0x7a (2)
0x70| 00 00 00 2e | .... | p_sot: 46 0x7a-0x7e (4)
0x70| 00 | . | tp_sot: 0 0x7e-0x7f (1)
0x70| 01| .| tn_sot: 1 0x7f-0x80 (1)
| | | [6]{}: segment 0x80-0x96 (22)
0x80|ff 5d |.] | marker: "qcc" (0xff5d) (Quantization component) 0x80-0x82 (2)
0x80| 00 14 | .. | length: 20 0x82-0x84 (2)
0x80| 00 40 80 00 00 00 00 00 00 00 00 00| .@..........| data: raw bits 0x84-0x96 (18)
0x90|00 00 00 00 00 00 |...... |
| | | [7]{}: segment 0x96-0xa2 (12)
0x90| ff 93 | .. | marker: "sod" (0xff93) (Start of data) 0x96-0x98 (2)
0x90| df f8 90 08 07 80 80 80| ........| data: raw bits 0x98-0xa2 (10)
0xa0|80 80 |.. |
| | | [8]{}: segment 0xa2-0xa4 (2)
0xa0| ff d9| | ..| | marker: "eoc" (0xffd9) (End of codestream) 0xa2-0xa4 (2)

BIN
format/jpeg/testdata/test.jp2 vendored Normal file

Binary file not shown.

98
format/jpeg/testdata/test.jp2.fqtest vendored Normal file
View File

@ -0,0 +1,98 @@
# gm convert "xc:#000000" test.jp2
$ fq dv test.jp2
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: test.jp2 (mp4) 0x0-0xf9 (249)
| | | boxes[0:4]: 0x0-0xf9 (249)
| | | [0]{}: box 0x0-0xc (12)
0x00|00 00 00 0c |.... | size: 12 0x0-0x4 (4)
0x00| 6a 50 20 20 | jP | type: "jP" (JPEG 2000 Signature) 0x4-0x8 (4)
0x00| 0d 0a 87 0a | .... | signature: raw bits (valid) 0x8-0xc (4)
| | | [1]{}: box 0xc-0x20 (20)
0x00| 00 00 00 14| ....| size: 20 0xc-0x10 (4)
0x10|66 74 79 70 |ftyp | type: "ftyp" (File type and compatibility) 0x10-0x14 (4)
0x10| 6a 70 32 20 | jp2 | major_brand: "jp2" 0x14-0x18 (4)
0x10| 00 00 00 00 | .... | minor_version: 0 0x18-0x1c (4)
| | | brands[0:1]: 0x1c-0x20 (4)
0x10| 6a 70 32 20| jp2 | [0]: "jp2" brand 0x1c-0x20 (4)
| | | [2]{}: box 0x20-0x4d (45)
0x20|00 00 00 2d |...- | size: 45 0x20-0x24 (4)
0x20| 6a 70 32 68 | jp2h | type: "jp2h" (Header) 0x24-0x28 (4)
| | | boxes[0:2]: 0x28-0x4d (37)
| | | [0]{}: box 0x28-0x3e (22)
0x20| 00 00 00 16 | .... | size: 22 0x28-0x2c (4)
0x20| 69 68 64 72| ihdr| type: "ihdr" (Image Header) 0x2c-0x30 (4)
0x30|00 00 00 01 |.... | width: 1 0x30-0x34 (4)
0x30| 00 00 00 01 | .... | height: 1 0x34-0x38 (4)
0x30| 00 01 | .. | nc: 1 0x38-0x3a (2)
0x30| 0f | . | bpc: 16 0x3a-0x3b (1)
0x30| 07 | . | c: "jpeg_2000" (7) 0x3b-0x3c (1)
0x30| 00 | . | unk_c: 0 0x3c-0x3d (1)
0x30| 00 | . | ipr: 0 0x3d-0x3e (1)
| | | [1]{}: box 0x3e-0x4d (15)
0x30| 00 00| ..| size: 15 0x3e-0x42 (4)
0x40|00 0f |.. |
0x40| 63 6f 6c 72 | colr | type: "colr" (Specifies the colourspace of the image) 0x42-0x46 (4)
0x40| 01 00 00 00 | .... | parameter_type: "\x01\x00\x00\x00" 0x46-0x4a (4)
0x40| 00 00 11 | ... | data: raw bits 0x4a-0x4d (3)
| | | [3]{}: box 0x4d-0xf9 (172)
0x40| 00 00 00| ...| size: 0 (Rest of file) 0x4d-0x51 (4)
0x50|00 |. |
0x50| 6a 70 32 63 | jp2c | type: "jp2c" (JPEG 2000 contiguous codestream) 0x51-0x55 (4)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| segments[0:9]: (jp2c) 0x55-0xf9 (164)
| | | [0]{}: segment 0x55-0x57 (2)
0x50| ff 4f | .O | marker: "soc" (0xff4f) (Start of codestream) 0x55-0x57 (2)
| | | [1]{}: segment 0x57-0x82 (43)
0x50| ff 51 | .Q | marker: "siz" (0xff51) (Image and tile size) 0x57-0x59 (2)
0x50| 00 29 | .) | l_siz: 41 0x59-0x5b (2)
0x50| 00 00 | .. | r_siz: 0 0x5b-0x5d (2)
0x50| 00 00 00| ...| x_siz: 1 0x5d-0x61 (4)
0x60|01 |. |
0x60| 00 00 00 01 | .... | y_siz: 1 0x61-0x65 (4)
0x60| 00 00 00 00 | .... | xo_siz: 0 0x65-0x69 (4)
0x60| 00 00 00 00 | .... | yo_siz: 0 0x69-0x6d (4)
0x60| 00 00 00| ...| xt_siz: 1 0x6d-0x71 (4)
0x70|01 |. |
0x70| 00 00 00 01 | .... | yt_siz: 1 0x71-0x75 (4)
0x70| 00 00 00 00 | .... | xto_siz: 0 0x75-0x79 (4)
0x70| 00 00 00 00 | .... | yto_siz: 0 0x79-0x7d (4)
0x70| 00 01 | .. | c_siz: 1 0x7d-0x7f (2)
| | | components[0:1]: 0x7f-0x82 (3)
| | | [0]{}: component 0x7f-0x82 (3)
0x70| 0f| .| s_sizi: 15 0x7f-0x80 (1)
0x80|01 |. | xr_sizi: 1 0x80-0x81 (1)
0x80| 01 | . | yr_sizi: 1 0x81-0x82 (1)
| | | [2]{}: segment 0x82-0xa6 (36)
0x80| ff 64 | .d | marker: "com" (0xff64) (Comment) 0x82-0x84 (2)
0x80| 00 22 | ." | length: 34 0x84-0x86 (2)
0x80| 00 01 | .. | r_cme: 1 0x86-0x88 (2)
0x80| 43 72 65 61 74 6f 72 3a| Creator:| data: "Creator: JasPer Version 2.0.33" 0x88-0xa6 (30)
0x90|20 4a 61 73 50 65 72 20 56 65 72 73 69 6f 6e 20| JasPer Version |
0xa0|32 2e 30 2e 33 33 |2.0.33 |
| | | [3]{}: segment 0xa6-0xb4 (14)
0xa0| ff 52 | .R | marker: "cod" (0xff52) (Coding style default) 0xa6-0xa8 (2)
0xa0| 00 0c | .. | length: 12 0xa8-0xaa (2)
0xa0| 00 00 00 01 00 05| ......| data: raw bits 0xaa-0xb4 (10)
0xb0|04 04 00 01 |.... |
| | | [4]{}: segment 0xb4-0xc9 (21)
0xb0| ff 5c | .\ | marker: "qcd" (0xff5c) (Quantization default) 0xb4-0xb6 (2)
0xb0| 00 13 | .. | length: 19 0xb6-0xb8 (2)
0xb0| 40 80 88 88 90 88 88 90| @.......| data: raw bits 0xb8-0xc9 (17)
0xc0|88 88 90 88 88 90 88 88 90 |......... |
| | | [5]{}: segment 0xc9-0xd5 (12)
0xc0| ff 90 | .. | marker: "sot" (0xff90) (Start of tile) 0xc9-0xcb (2)
0xc0| 00 0a | .. | l_sot: 10 0xcb-0xcd (2)
0xc0| 00 00 | .. | i_sot: 0 0xcd-0xcf (2)
0xc0| 00| .| p_sot: 46 0xcf-0xd3 (4)
0xd0|00 00 2e |... |
0xd0| 00 | . | tp_sot: 0 0xd3-0xd4 (1)
0xd0| 01 | . | tn_sot: 1 0xd4-0xd5 (1)
| | | [6]{}: segment 0xd5-0xeb (22)
0xd0| ff 5d | .] | marker: "qcc" (0xff5d) (Quantization component) 0xd5-0xd7 (2)
0xd0| 00 14 | .. | length: 20 0xd7-0xd9 (2)
0xd0| 00 40 80 00 00 00 00| .@.....| data: raw bits 0xd9-0xeb (18)
0xe0|00 00 00 00 00 00 00 00 00 00 00 |........... |
| | | [7]{}: segment 0xeb-0xf7 (12)
0xe0| ff 93 | .. | marker: "sod" (0xff93) (Start of data) 0xeb-0xed (2)
0xe0| df f8 90| ...| data: raw bits 0xed-0xf7 (10)
0xf0|08 07 80 80 80 80 80 |....... |
| | | [8]{}: segment 0xf7-0xf9 (2)
0xf0| ff d9| | ..| | marker: "eoc" (0xffd9) (End of codestream) 0xf7-0xf9 (2)

View File

@ -7,7 +7,7 @@ package leveldb
// - MANIFEST-*
import (
"github.com/wader/fq/internal/mathex"
"github.com/wader/fq/internal/mathx"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/scalar"
)
@ -49,7 +49,7 @@ func readBlockSequence(rro recordReadOptions, d *decode.D) {
d.FieldArray("blocks", func(d *decode.D) {
for d.BitsLeft() >= headerSize {
d.LimitedFn(mathex.Min(blockSize, d.BitsLeft()), func(d *decode.D) {
d.LimitedFn(mathx.Min(blockSize, d.BitsLeft()), func(d *decode.D) {
d.FieldStruct("block", bind(readLogBlock, rro))
})
}

View File

@ -20,7 +20,7 @@ $ fq -d leveldb_log dv log_only.ldb/000003.log
0x010| 6c 6f 72 65 6d 2e 6c 6f 72 65 6d| lorem.lorem| data: "lorem.lorem" 0x15-0x20 (11)
| | | value{}: 0x20-0x1df (447)
0x020|bd 03 |.. | length: 445 0x20-0x22 (2)
0x020| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f| Lorem ipsum do| data: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x22-0x1df (445)
0x020| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f| Lorem ipsum do| data: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x22-0x1df (445)
0x030|6c 6f 72 20 73 69 74 20 61 6d 65 74 2c 20 63 6f|lor sit amet, co|
* |until 0x1de.7 (445) | |
| | | [1]{}: record 0x1df-0x3be (479)
@ -42,7 +42,7 @@ $ fq -d leveldb_log dv log_only.ldb/000003.log
| | | value{}: 0x1ff-0x3be (447)
0x1f0| bd| .| length: 445 0x1ff-0x201 (2)
0x200|03 |. |
0x200| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c| Lorem ipsum dol| data: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x201-0x3be (445)
0x200| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c| Lorem ipsum dol| data: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x201-0x3be (445)
0x210|6f 72 20 73 69 74 20 61 6d 65 74 2c 20 63 6f 6e|or sit amet, con|
* |until 0x3bd.7 (445) | |
| | | [2]{}: record 0x3be-0x59d (479)
@ -63,7 +63,7 @@ $ fq -d leveldb_log dv log_only.ldb/000003.log
0x3d0| 6c 6f 72 65 6d 2e 64 6f 6c 6f 72 | lorem.dolor | data: "lorem.dolor" 0x3d3-0x3de (11)
| | | value{}: 0x3de-0x59d (447)
0x3d0| bd 03| ..| length: 445 0x3de-0x3e0 (2)
0x3e0|4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f|Lorem ipsum dolo| data: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x3e0-0x59d (445)
0x3e0|4c 6f 72 65 6d 20 69 70 73 75 6d 20 64 6f 6c 6f|Lorem ipsum dolo| data: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x3e0-0x59d (445)
* |until 0x59c.7 (445) | |
| | | [3]{}: record 0x59d-0x62c (143)
| | | header{}: 0x59d-0x5a4 (7)
@ -82,6 +82,6 @@ $ fq -d leveldb_log dv log_only.ldb/000003.log
0x5b0| 72 6f 77 | row | data: "row" 0x5b2-0x5b5 (3)
| | | value{}: 0x5b5-0x62c (119)
0x5b0| 76 | v | length: 118 0x5b5-0x5b6 (1)
0x5b0| 52 6f 77 2c 20 72 6f 77 2c 20| Row, row, | data: "Row, row, row your boat\nGently down the stream...." 0x5b6-0x62c (118)
0x5b0| 52 6f 77 2c 20 72 6f 77 2c 20| Row, row, | data: "Row, row, row your boat\nGently down the stream.\nMerrily, merrily, merrily, merrily,\nLife is but a dream. 🚣\u200d♂" 0x5b6-0x62c (118)
0x5c0|72 6f 77 20 79 6f 75 72 20 62 6f 61 74 0a 47 65|row your boat.Ge|
* |until 0x62b.7 (end) (118) | |

View File

@ -12,7 +12,7 @@ $ fq -d leveldb_table dv snappy.ldb/000005.ldb
0x000| 6c 6f 72 65 6d 2e 64 6f 6c 6f 72 | lorem.dolor | user_key: "lorem.dolor" 0x4-0xf (11)
0x000| 01| .| type: "value" (0x1) 0xf-0x10 (1)
0x001|03 00 00 00 00 00 00 |....... | sequence_number: 3 0x10-0x17 (7)
0x001| 4c 6f 72 65 6d 20 69 70 73| Lorem ips| value: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x17-0x1d4 (445)
0x001| 4c 6f 72 65 6d 20 69 70 73| Lorem ips| value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x17-0x1d4 (445)
0x002|75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65|um dolor sit ame|
* |until 0x1d3.7 (445) | |
| | | [1]{}: entry 0x1d4-0x3a2 (462)
@ -25,7 +25,7 @@ $ fq -d leveldb_table dv snappy.ldb/000005.ldb
0x01d| 01 | . | type: "value" (0x1) 0x1dd-0x1de (1)
0x01d| 02 00| ..| sequence_number: 2 0x1de-0x1e5 (7)
0x01e|00 00 00 00 00 |..... |
0x01e| 4c 6f 72 65 6d 20 69 70 73 75 6d| Lorem ipsum| value: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x1e5-0x3a2 (445)
0x01e| 4c 6f 72 65 6d 20 69 70 73 75 6d| Lorem ipsum| value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x1e5-0x3a2 (445)
0x01f|20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 2c| dolor sit amet,|
* |until 0x3a1.7 (445) | |
| | | [2]{}: entry 0x3a2-0x570 (462)
@ -38,7 +38,7 @@ $ fq -d leveldb_table dv snappy.ldb/000005.ldb
0x03a| 01 | . | type: "value" (0x1) 0x3ab-0x3ac (1)
0x03a| 01 00 00 00| ....| sequence_number: 1 0x3ac-0x3b3 (7)
0x03b|00 00 00 |... |
0x03b| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64| Lorem ipsum d| value: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x3b3-0x570 (445)
0x03b| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64| Lorem ipsum d| value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x3b3-0x570 (445)
0x03c|6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 2c 20 63|olor sit amet, c|
* |until 0x56f.7 (445) | |
| | | [3]{}: entry 0x570-0x5f4 (132)
@ -49,7 +49,7 @@ $ fq -d leveldb_table dv snappy.ldb/000005.ldb
0x057| 72 6f 77 | row | user_key: "row" 0x573-0x576 (3)
0x057| 01 | . | type: "value" (0x1) 0x576-0x577 (1)
0x057| 04 00 00 00 00 00 00 | ....... | sequence_number: 4 0x577-0x57e (7)
0x057| 52 6f| Ro| value: "Row, row, row your boat\nGently down the stream...." 0x57e-0x5f4 (118)
0x057| 52 6f| Ro| value: "Row, row, row your boat\nGently down the stream.\nMerrily, merrily, merrily, merrily,\nLife is but a dream. 🚣\u200d♂" 0x57e-0x5f4 (118)
0x058|77 2c 20 72 6f 77 2c 20 72 6f 77 20 79 6f 75 72|w, row, row your|
* |until 0x5f3.7 (118) | |
| | | trailer{}: 0x5f4-0x5fc (8)

View File

@ -12,7 +12,7 @@ $ fq -d leveldb_table dv uncompressed.ldb/000005.ldb
0x000| 6c 6f 72 65 6d 2e 64 6f 6c 6f 72 | lorem.dolor | user_key: "lorem.dolor" 0x4-0xf (11)
0x000| 01| .| type: "value" (0x1) 0xf-0x10 (1)
0x010|03 00 00 00 00 00 00 |....... | sequence_number: 3 0x10-0x17 (7)
0x010| 4c 6f 72 65 6d 20 69 70 73| Lorem ips| value: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x17-0x1d4 (445)
0x010| 4c 6f 72 65 6d 20 69 70 73| Lorem ips| value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x17-0x1d4 (445)
0x020|75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65|um dolor sit ame|
* |until 0x1d3.7 (445) | |
| | | [1]{}: entry 0x1d4-0x3a2 (462)
@ -25,7 +25,7 @@ $ fq -d leveldb_table dv uncompressed.ldb/000005.ldb
0x1d0| 01 | . | type: "value" (0x1) 0x1dd-0x1de (1)
0x1d0| 02 00| ..| sequence_number: 2 0x1de-0x1e5 (7)
0x1e0|00 00 00 00 00 |..... |
0x1e0| 4c 6f 72 65 6d 20 69 70 73 75 6d| Lorem ipsum| value: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x1e5-0x3a2 (445)
0x1e0| 4c 6f 72 65 6d 20 69 70 73 75 6d| Lorem ipsum| value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x1e5-0x3a2 (445)
0x1f0|20 64 6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 2c| dolor sit amet,|
* |until 0x3a1.7 (445) | |
| | | [2]{}: entry 0x3a2-0x570 (462)
@ -38,7 +38,7 @@ $ fq -d leveldb_table dv uncompressed.ldb/000005.ldb
0x3a0| 01 | . | type: "value" (0x1) 0x3ab-0x3ac (1)
0x3a0| 01 00 00 00| ....| sequence_number: 1 0x3ac-0x3b3 (7)
0x3b0|00 00 00 |... |
0x3b0| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64| Lorem ipsum d| value: "Lorem ipsum dolor sit amet, consectetur adipisc..." 0x3b3-0x570 (445)
0x3b0| 4c 6f 72 65 6d 20 69 70 73 75 6d 20 64| Lorem ipsum d| value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 0x3b3-0x570 (445)
0x3c0|6f 6c 6f 72 20 73 69 74 20 61 6d 65 74 2c 20 63|olor sit amet, c|
* |until 0x56f.7 (445) | |
| | | [3]{}: entry 0x570-0x5f4 (132)
@ -49,7 +49,7 @@ $ fq -d leveldb_table dv uncompressed.ldb/000005.ldb
0x570| 72 6f 77 | row | user_key: "row" 0x573-0x576 (3)
0x570| 01 | . | type: "value" (0x1) 0x576-0x577 (1)
0x570| 04 00 00 00 00 00 00 | ....... | sequence_number: 4 0x577-0x57e (7)
0x570| 52 6f| Ro| value: "Row, row, row your boat\nGently down the stream...." 0x57e-0x5f4 (118)
0x570| 52 6f| Ro| value: "Row, row, row your boat\nGently down the stream.\nMerrily, merrily, merrily, merrily,\nLife is but a dream. 🚣\u200d♂" 0x57e-0x5f4 (118)
0x580|77 2c 20 72 6f 77 2c 20 72 6f 77 20 79 6f 75 72|w, row, row your|
* |until 0x5f3.7 (118) | |
| | | trailer{}: 0x5f4-0x5fc (8)

View File

@ -379,8 +379,8 @@ $ fq -d matroska dv opus.mkv
| | | toc{}: 0x24a-0x2c3 (121)
| | | config{}: 0x24a-0x24a.5 (0.5)
0x240| f8 | . | config: 31 0x24a-0x24a.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x240| f8 | . | stereo: false 0x24a.5-0x24a.6 (0.1)
| | | frames_per_packet{}: 0x24a.6-0x24b (0.2)
@ -407,8 +407,8 @@ $ fq -d matroska dv opus.mkv
| | | toc{}: 0x2c9-0x342 (121)
| | | config{}: 0x2c9-0x2c9.5 (0.5)
0x2c0| f8 | . | config: 31 0x2c9-0x2c9.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x2c0| f8 | . | stereo: false 0x2c9.5-0x2c9.6 (0.1)
| | | frames_per_packet{}: 0x2c9.6-0x2ca (0.2)
@ -439,8 +439,8 @@ $ fq -d matroska dv opus.mkv
| | | toc{}: 0x351-0x3ca (121)
| | | config{}: 0x351-0x351.5 (0.5)
0x350| f8 | . | config: 31 0x351-0x351.5 (0.5)
| | | mode: "CELT-only"
| | | bandwidth: "FB"
| | | mode: "celt_only"
| | | bandwidth: "fb"
| | | frame_size: 20
0x350| f8 | . | stereo: false 0x351.5-0x351.6 (0.1)
| | | frames_per_packet{}: 0x351.6-0x352 (0.2)

View File

@ -243,7 +243,7 @@ $ fq -d matroska dv vorbis.mkv
0x0170| 10 | . | [1]: 16 lace_size 0x178-0x179 (1)
| | | laces[0:3]: 0x179-0xe56 (3293)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: packet (vorbis_packet) 0x179-0x197 (30)
0x0170| 01 | . | packet_type: "Identification" (1) 0x179-0x17a (1)
0x0170| 01 | . | packet_type: "identification" (1) 0x179-0x17a (1)
0x0170| 76 6f 72 62 69 73| vorbis| magic: "vorbis" (valid) 0x17a-0x180 (6)
0x0180|00 00 00 00 |.... | vorbis_version: 0 (valid) 0x180-0x184 (4)
0x0180| 02 | . | audio_channels: 2 0x184-0x185 (1)
@ -257,7 +257,7 @@ $ fq -d matroska dv vorbis.mkv
0x0190| 01 | . | padding0: raw bits (all zero) 0x196-0x196.7 (0.7)
0x0190| 01 | . | framing_flag: 1 (valid) 0x196.7-0x197 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [1]{}: packet (vorbis_packet) 0x197-0x1a7 (16)
0x0190| 03 | . | packet_type: "Comment" (3) 0x197-0x198 (1)
0x0190| 03 | . | packet_type: "comment" (3) 0x197-0x198 (1)
0x0190| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x198-0x19e (6)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| comment{}: (vorbis_comment) 0x19e-0x1a6 (8)
0x0190| 00 00| ..| vendor_length: 0 0x19e-0x1a2 (4)
@ -268,7 +268,7 @@ $ fq -d matroska dv vorbis.mkv
0x01a0| 01 | . | padding0: raw bits (all zero) 0x1a6-0x1a6.7 (0.7)
0x01a0| 01 | . | frame_bit: 1 (valid) 0x1a6.7-0x1a7 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [2]{}: packet (vorbis_packet) 0x1a7-0xe56 (3247)
0x01a0| 05 | . | packet_type: "Setup" (5) 0x1a7-0x1a8 (1)
0x01a0| 05 | . | packet_type: "setup" (5) 0x1a7-0x1a8 (1)
0x01a0| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1a8-0x1ae (6)
0x01a0| 1c | . | vorbis_codebook_count: 29 0x1ae-0x1af (1)
0x01a0| 42| B| codecooke_sync: 0x564342 (valid) 0x1af-0x1b2 (3)
@ -396,7 +396,7 @@ $ fq -d matroska dv vorbis.mkv
0x0f10|80 |. | lacing: "none" (0) 0xf10.5-0xf10.7 (0.2)
0x0f10|80 |. | discardable: false 0xf10.7-0xf11 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet{}: (vorbis_packet) 0xf11-0xfc7 (182)
0x0f10| be | . | packet_type: "Audio" (0) 0xf11-0xf12 (1)
0x0f10| be | . | packet_type: "audio" (0) 0xf11-0xf12 (1)
0x0f10| b7 f2 81 46 74 15 42 0b 52 08 17 32 8e 43| ...Ft.B.R..2.C| data: raw bits 0xf12-0xfc7 (181)
0x0f20|08 65 84 84 f6 56 3e d0 88 ae 42 68 41 0a e1 42|.e...V>...BhA..B|
* |until 0xfc6.7 (181) | |
@ -413,7 +413,7 @@ $ fq -d matroska dv vorbis.mkv
0x0fc0| 80 | . | lacing: "none" (0) 0xfcc.5-0xfcc.7 (0.2)
0x0fc0| 80 | . | discardable: false 0xfcc.7-0xfcd (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet{}: (vorbis_packet) 0xfcd-0x1019 (76)
0x0fc0| be | . | packet_type: "Audio" (0) 0xfcd-0xfce (1)
0x0fc0| be | . | packet_type: "audio" (0) 0xfcd-0xfce (1)
0x0fc0| 13 a2| ..| data: raw bits 0xfce-0x1019 (75)
0x0fd0|9b 06 0a b6 ff 13 10 ff 25 62 ec 8f d9 f7 a2 11|........%b......|
* |until 0x1018.7 (75) | |
@ -435,7 +435,7 @@ $ fq -d matroska dv vorbis.mkv
0x1020| 00 | . | lacing: "none" (0) 0x1028.5-0x1028.7 (0.2)
0x1020| 00 | . | not_used: false 0x1028.7-0x1029 (0.1)
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| packet{}: (vorbis_packet) 0x1029-0x10d8 (175)
0x1020| be | . | packet_type: "Audio" (0) 0x1029-0x102a (1)
0x1020| be | . | packet_type: "audio" (0) 0x1029-0x102a (1)
0x1020| a7 f2 81 46 bb c2| ...F..| data: raw bits 0x102a-0x10d8 (174)
0x1030|48 52 08 27 b8 83 10 ca 08 b1 a7 f2 81 46 bb c2|HR.'.........F..|
* |until 0x10d7.7 (174) | |

View File

@ -53,7 +53,7 @@ var subTypeNames = scalar.StrMapDescription{
"subp": "Subpicture",
"text": "Text",
"tmcd": "Time Code",
"url ": "URL",
"url": "URL",
"vide": "Video Track",
}
@ -101,7 +101,7 @@ var dataFormatNames = scalar.StrMapDescription{
"encs": "Encrypted Systems stream",
"enct": "Encrypted Text",
"encv": "Encrypted/protected video",
"fdp ": "File delivery hints",
"fdp": "File delivery hints",
"fLaC": "Fres Lossless Audio Codec",
"g719": "ITU-T Recommendation G.719 (2008)",
"g726": "ITU-T Recommendation G.726 (1990)",
@ -138,13 +138,13 @@ var dataFormatNames = scalar.StrMapDescription{
"Opus": "Opus audio coding",
"pm2t": "Protected MPEG-2 Transport",
"prtp": "Protected RTP Reception",
"raw ": "Uncompressed audio",
"raw": "Uncompressed audio",
"resv": "Restricted Video",
"rm2t": "MPEG-2 Transport Reception",
"rrtp": "RTP reception",
"rsrp": "SRTP Reception",
"rtmd": "Real Time Metadata Sample Entry(XAVC Format)",
"rtp ": "RTP Hints",
"rtp": "RTP Hints",
"s263": "ITU H.263 video (3GPP format)",
"samr": "Narrowband AMR voice",
"sawb": "Wideband AMR voice",
@ -248,7 +248,7 @@ func decodeSampleFlags(d *decode.D) {
func decodeBoxWithParentData(ctx *decodeContext, d *decode.D, parentData any, extraTypeMappers ...scalar.StrMapper) {
var dataSize uint64
typeMappers := []scalar.StrMapper{boxDescriptions}
typeMappers := []scalar.StrMapper{scalar.ActualTrimSpace, boxDescriptions}
if len(extraTypeMappers) > 0 {
typeMappers = append(typeMappers, extraTypeMappers...)
}
@ -339,13 +339,7 @@ type keysBox struct {
keys []keysBoxKey
}
func decodeBoxIrefEntry(ctx *decodeContext, d *decode.D) {
irefBox, ok := ctx.parent().data.(*irefBox)
if !ok {
d.FieldRawLen("data", d.BitsLeft())
return
}
func decodeBoxIrefEntry(irefBox *irefBox, d *decode.D) {
idSize := 16
if irefBox.version != 0 {
idSize = 32
@ -525,7 +519,7 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
d.FieldU8("version")
d.FieldU24("flags")
d.FieldUTF8NullFixedLen("component_type", 4)
subType := d.FieldUTF8("component_subtype", 4, subTypeNames, scalar.ActualTrimSpace)
subType := d.FieldUTF8("component_subtype", 4, scalar.ActualTrimSpace, subTypeNames)
d.FieldUTF8NullFixedLen("component_manufacturer", 4)
d.FieldU32("component_flags")
d.FieldU32("component_flags_mask")
@ -533,7 +527,12 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
switch majorBrand {
case "qt":
// qt brand seems to use length prefixed strings
d.FieldUTF8ShortStringFixedLen("component_name", int(d.BitsLeft()/8))
// From QuickTime File Format specification:
// > A (counted) string that specifies the name of the component—that is, the media handler used
// > when this media was created. This field may contain a zero-length (empty) string.
if d.BitsLeft() > 0 {
d.FieldUTF8ShortStringFixedLen("component_name", int(d.BitsLeft()/8))
}
default:
d.FieldUTF8NullFixedLen("component_name", int(d.BitsLeft()/8))
}
@ -560,12 +559,12 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
var drefURL string
d.FieldStructArrayLoop("boxes", "box", func() bool { return i < entryCount }, func(d *decode.D) {
size := d.FieldU32("size")
typ := d.FieldUTF8("type", 4)
typ := d.FieldUTF8("type", 4, scalar.ActualTrimSpace)
d.FieldU8("version")
d.FieldU24("flags")
dataSize := size - 12
switch typ {
case "url ":
case "url":
drefURL = d.FieldUTF8("data", int(dataSize))
default:
d.FieldRawLen("data", int64(dataSize*8))
@ -590,7 +589,7 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
d.FieldArrayLoop("boxes", func() bool { return i < entryCount }, func(d *decode.D) {
d.FieldStruct("box", func(d *decode.D) {
size := d.FieldU32("size")
dataFormat := d.FieldUTF8("type", 4, dataFormatNames)
dataFormat := d.FieldUTF8("type", 4, dataFormatNames, scalar.ActualTrimSpace)
subType := ""
if t := ctx.currentTrack(); t != nil {
t.sampleDescriptions = append(t.sampleDescriptions, sampleDescription{
@ -1243,7 +1242,7 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
if !d.End() {
d.FieldUTF8Null("content_encoding")
}
case "uri ":
case "uri":
d.FieldUTF8Null("item_uri_type")
}
}
@ -1709,11 +1708,26 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
d.FieldU24("flags")
decodeBoxesWithParentData(ctx, d, &irefBox{version: int(version)})
case "dimg":
decodeBoxIrefEntry(ctx, d)
if irefBox, ok := ctx.parent().data.(*irefBox); ok {
decodeBoxIrefEntry(irefBox, d)
} else {
d.FieldRawLen("data", d.BitsLeft())
}
case "thmb":
decodeBoxIrefEntry(ctx, d)
if irefBox, ok := ctx.parent().data.(*irefBox); ok {
decodeBoxIrefEntry(irefBox, d)
} else {
d.FieldU8("version")
d.FieldU24("flags")
d.FieldUTF8("format", 4)
d.FieldFormatOrRawLen("image", d.BitsLeft(), &imageGroup, nil)
}
case "cdsc":
decodeBoxIrefEntry(ctx, d)
if irefBox, ok := ctx.parent().data.(*irefBox); ok {
decodeBoxIrefEntry(irefBox, d)
} else {
d.FieldRawLen("data", d.BitsLeft())
}
case "irot":
d.FieldU8("rotation", scalar.UintMapSymUint{
0: 0,
@ -1784,6 +1798,40 @@ func decodeBox(ctx *decodeContext, d *decode.D, typ string) {
default:
d.FieldRawLen("message_data", d.BitsLeft())
}
case "jp2h":
decodeBoxes(ctx, d)
case "ihdr":
d.FieldU32("width")
d.FieldU32("height")
d.FieldU16("nc")
d.FieldU8("bpc", scalar.UintActualAdd(1))
d.FieldU8("c", scalar.UintMapSymStr{
0: "uncompressed",
1: "modified_huffman",
2: "modified_read",
3: "modified_modified_read",
4: "jbig_bi_level",
5: "jpeg",
6: "jpeg_ls",
7: "jpeg_2000",
8: "jbig2",
9: "jbig",
})
d.FieldU8("unk_c")
d.FieldU8("ipr")
case "jP":
d.FieldRawLen("signature", 4*8, d.AssertBitBuf([]byte{0x0d, 0x0a, 0x87, 0x0a}))
case "jp2c":
d.FieldFormat("segments", &jp2cGroup, nil)
case "uinf":
decodeBoxes(ctx, d)
case "ulst":
nu := d.FieldU16("nu")
d.FieldArray("uids", func(d *decode.D) {
for i := 0; i < int(nu); i++ {
d.FieldRawLen("uid", 128)
}
})
default:
// there are at least 4 ways to encode udta metadata in mov/mp4 files.

View File

@ -85,7 +85,7 @@ var brandDescriptions = scalar.StrMapDescription{
"dv3b": "DMB AF extending dv3a with 3GPP timed text, DID, TVA, REL, IPMP",
"dvr1": "DVB RTP",
"dvt1": "DVB Transport Stream",
"dxo ": "DxO ONE camera",
"dxo": "DxO ONE camera",
"emsg": "Event message box present",
"F4A": "Audio for Adobe Flash Player 9+ (.F4A)",
"F4B": "Audio Book for Adobe Flash Player 9+ (.F4B)",
@ -160,7 +160,7 @@ var brandDescriptions = scalar.StrMapDescription{
"pana": "Panasonic Digital Camera",
"piff": "Protected Interoperable File Format",
"pnvi": "Panasonic Video Intercom Video Intercom",
"qt ": "QuickTime",
"qt": "QuickTime",
"risx": "Representation Index Segment used to index MPEG-2 TS based Media Segments",
"ROSS": "Ross Video Ross",
"sdv": "SD Video",

View File

@ -104,7 +104,7 @@ var boxDescriptions = scalar.StrMapDescription{
"irot": "Image rotation imir image mirroring",
"ispe": "Image spatial extents",
"j2kH": "JPEG 2000 header item property",
"jP ": "JPEG 2000 Signature",
"jP": "JPEG 2000 Signature",
"jp2c": "JPEG 2000 contiguous codestream",
"jp2h": "Header",
"jp2i": "Intellectual property information",
@ -174,7 +174,7 @@ var boxDescriptions = scalar.StrMapDescription{
"pssh": "Protection system specific header",
"ptle": "Partial Top Level Entry",
"reel": "Name of the tape reel",
"res ": "Grid resolution",
"res": "Grid resolution",
"resc": "Grid resolution at which the image was captured",
"resd": "Default grid resolution at which the image should be displayed",
"rinf": "Restricted scheme information box",
@ -255,12 +255,12 @@ var boxDescriptions = scalar.StrMapDescription{
"UITS": "Unique Identifier Technology Solution",
"ulst": "A list of UUIDs",
"urat": "User 'star' rating of the media",
"url ": "A URL",
"url": "A URL",
"uuid": "User-extension box",
"vmhd": "Video media header, overall information (video track only)",
"vwdi": "Multiview Scene Information",
"wide": "Expansion space reservation",
"xml ": "XML container",
"xml": "XML container",
"yrrc": "Year when media was recorded",
// from https://wiki.multimedia.cx/index.php/FFmpeg_Metadata

View File

@ -16,11 +16,12 @@ package mp4
// TODO: better probe, find first 2 boxes, should be free,ftyp or mdat?
import (
"cmp"
"embed"
"fmt"
"strings"
"github.com/wader/fq/format"
"github.com/wader/fq/internal/cmpex"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
"golang.org/x/exp/slices"
@ -42,6 +43,7 @@ var hevcCDCRGroup decode.Group
var iccProfileGroup decode.Group
var id3v2Group decode.Group
var imageGroup decode.Group
var jp2cGroup decode.Group
var jpegGroup decode.Group
var mp3FrameGroup decode.Group
var mpegESGroup decode.Group
@ -82,6 +84,7 @@ func init() {
{Groups: []*decode.Group{format.ICC_Profile}, Out: &iccProfileGroup},
{Groups: []*decode.Group{format.ID3v2}, Out: &id3v2Group},
{Groups: []*decode.Group{format.Image}, Out: &imageGroup},
{Groups: []*decode.Group{format.JP2C}, Out: &jp2cGroup},
{Groups: []*decode.Group{format.JPEG}, Out: &jpegGroup},
{Groups: []*decode.Group{format.MP3_Frame}, Out: &mp3FrameGroup},
{Groups: []*decode.Group{format.MPEG_ES}, Out: &mpegESGroup},
@ -240,10 +243,10 @@ func mp4Tracks(d *decode.D, ctx *decodeContext) {
// sort by id then order in file
slices.SortStableFunc(tracksCollected, func(a, b *trackCollected) int {
if r := cmpex.Compare(a.track.id, b.track.id); r != 0 {
if r := cmp.Compare(a.track.id, b.track.id); r != 0 {
return r
}
return cmpex.Compare(a.order, b.order)
return cmp.Compare(a.order, b.order)
})
d.FieldArray("tracks", func(d *decode.D) {
@ -465,14 +468,14 @@ func mp4Decode(d *decode.D) any {
if size < 8 {
d.Fatalf("first box size too small < 8")
}
firstType := d.UTF8(4)
firstType := strings.TrimSpace(d.UTF8(4))
switch firstType {
case "styp", // mp4 segment
"ftyp", // mp4 file
"free", // seems to happen
"moov", // seems to happen
"pnot", // video preview file
"jP ": // JPEG 2000
"jP": // JPEG 2000
default:
d.Errorf("no styp, ftyp, free or moov box found")
}

View File

@ -22,8 +22,8 @@ const (
)
var recordTypeNames = scalar.UintMapSymStr{
recordTypeRightsManagementHeader: "Rights management header",
recordTypeLicenseStore: "License store",
recordTypeRightsManagementHeader: "rights_management_header",
recordTypeLicenseStore: "license_store",
}
func playreadyPsshDecode(d *decode.D) any {

View File

@ -179,7 +179,7 @@ $ fq -d mp4 dv aac.mp4
| | | boxes[0:1]: 0x413-0x41f (12)
| | | [0]{}: box 0x413-0x41f (12)
0x410| 00 00 00 0c | .... | size: 12 0x413-0x417 (4)
0x410| 75 72 6c 20 | url | type: "url " 0x417-0x41b (4)
0x410| 75 72 6c 20 | url | type: "url" 0x417-0x41b (4)
0x410| 00 | . | version: 0 0x41b-0x41c (1)
0x410| 00 00 01 | ... | flags: 1 0x41c-0x41f (3)
| | | data: "" 0x41f-0x41f (0)

View File

@ -164,7 +164,7 @@ $ fq -d mp4 dv av1.mp4
| | | boxes[0:1]: 0x1345-0x1351 (12)
| | | [0]{}: box 0x1345-0x1351 (12)
0x1340| 00 00 00 0c | .... | size: 12 0x1345-0x1349 (4)
0x1340| 75 72 6c 20 | url | type: "url " 0x1349-0x134d (4)
0x1340| 75 72 6c 20 | url | type: "url" 0x1349-0x134d (4)
0x1340| 00 | . | version: 0 0x134d-0x134e (1)
0x1340| 00 00| ..| flags: 1 0x134e-0x1351 (3)
0x1350|01 |. |

View File

@ -182,7 +182,7 @@ $ fq -d mp4 dv avc.mp4
| | | boxes[0:1]: 0xf06-0xf12 (12)
| | | [0]{}: box 0xf06-0xf12 (12)
0x00f00| 00 00 00 0c | .... | size: 12 0xf06-0xf0a (4)
0x00f00| 75 72 6c 20 | url | type: "url " 0xf0a-0xf0e (4)
0x00f00| 75 72 6c 20 | url | type: "url" 0xf0a-0xf0e (4)
0x00f00| 00 | . | version: 0 0xf0e-0xf0f (1)
0x00f00| 00| .| flags: 1 0xf0f-0xf12 (3)
0x00f10|00 01 |.. |

View File

@ -197,7 +197,7 @@ $ fq -d mp4 dv dash_audio_init.mp4
| | | boxes[0:1]: 0x1fa-0x206 (12)
| | | [0]{}: box 0x1fa-0x206 (12)
0x1f0| 00 00 00 0c | .... | size: 12 0x1fa-0x1fe (4)
0x1f0| 75 72| ur| type: "url " 0x1fe-0x202 (4)
0x1f0| 75 72| ur| type: "url" 0x1fe-0x202 (4)
0x200|6c 20 |l |
0x200| 00 | . | version: 0 0x202-0x203 (1)
0x200| 00 00 01 | ... | flags: 1 0x203-0x206 (3)

View File

@ -6,7 +6,7 @@ $ fq -o force=true -d mp4 dv emsg.mp4
0x000| 65 6d 73 67 | emsg | type: "emsg" (Event message) 0x4-0x8 (4)
0x000| 00 | . | version: 0 0x8-0x9 (1)
0x000| 00 00 00 | ... | flags: 0 0x9-0xc (3)
0x000| 68 74 74 70| http| scheme_id_uri: "http://youtube.com/streaming/metadata/segment/1..." 0xc-0x41 (53)
0x000| 68 74 74 70| http| scheme_id_uri: "http://youtube.com/streaming/metadata/segment/102015" 0xc-0x41 (53)
0x010|3a 2f 2f 79 6f 75 74 75 62 65 2e 63 6f 6d 2f 73|://youtube.com/s|
* |until 0x40.7 (53) | |
0x040| 00 | . | value: "" 0x41-0x42 (1)

View File

@ -178,7 +178,7 @@ $ fq -d mp4 dv flac.mp4
| | | boxes[0:1]: 0x40b-0x417 (12)
| | | [0]{}: box 0x40b-0x417 (12)
0x400| 00 00 00 0c | .... | size: 12 0x40b-0x40f (4)
0x400| 75| u| type: "url " 0x40f-0x413 (4)
0x400| 75| u| type: "url" 0x40f-0x413 (4)
0x410|72 6c 20 |rl |
0x410| 00 | . | version: 0 0x413-0x414 (1)
0x410| 00 00 01 | ... | flags: 1 0x414-0x417 (3)

View File

@ -140,7 +140,7 @@ $ fq -d mp4 dv fragmented.mp4
| | | boxes[0:1]: 0x185-0x191 (12)
| | | [0]{}: box 0x185-0x191 (12)
0x00180| 00 00 00 0c | .... | size: 12 0x185-0x189 (4)
0x00180| 75 72 6c 20 | url | type: "url " 0x189-0x18d (4)
0x00180| 75 72 6c 20 | url | type: "url" 0x189-0x18d (4)
0x00180| 00 | . | version: 0 0x18d-0x18e (1)
0x00180| 00 00| ..| flags: 1 0x18e-0x191 (3)
0x00190|01 |. |
@ -402,7 +402,7 @@ $ fq -d mp4 dv fragmented.mp4
| | | [0]{}: box 0x36d-0x379 (12)
0x00360| 00 00 00| ...| size: 12 0x36d-0x371 (4)
0x00370|0c |. |
0x00370| 75 72 6c 20 | url | type: "url " 0x371-0x375 (4)
0x00370| 75 72 6c 20 | url | type: "url" 0x371-0x375 (4)
0x00370| 00 | . | version: 0 0x375-0x376 (1)
0x00370| 00 00 01 | ... | flags: 1 0x376-0x379 (3)
| | | data: "" 0x379-0x379 (0)

View File

@ -182,7 +182,7 @@ $ fq -d mp4 dv hevc.mp4
| | | boxes[0:1]: 0xa06-0xa12 (12)
| | | [0]{}: box 0xa06-0xa12 (12)
0x0a00| 00 00 00 0c | .... | size: 12 0xa06-0xa0a (4)
0x0a00| 75 72 6c 20 | url | type: "url " 0xa0a-0xa0e (4)
0x0a00| 75 72 6c 20 | url | type: "url" 0xa0a-0xa0e (4)
0x0a00| 00 | . | version: 0 0xa0e-0xa0f (1)
0x0a00| 00| .| flags: 1 0xa0f-0xa12 (3)
0x0a10|00 01 |.. |

View File

@ -170,7 +170,7 @@ $ fq dv in24.mp4
| | | boxes[0:1]: 0x2d9-0x2e5 (12)
| | | [0]{}: box 0x2d9-0x2e5 (12)
0x2d0| 00 00 00 0c | .... | size: 12 0x2d9-0x2dd (4)
0x2d0| 75 72 6c| url| type: "url " 0x2dd-0x2e1 (4)
0x2d0| 75 72 6c| url| type: "url" 0x2dd-0x2e1 (4)
0x2e0|20 | |
0x2e0| 00 | . | version: 0 0x2e1-0x2e2 (1)
0x2e0| 00 00 01 | ... | flags: 1 0x2e2-0x2e5 (3)

View File

@ -172,7 +172,7 @@ $ fq dv lpcm.mp4
| | | boxes[0:1]: 0x411-0x41d (12)
| | | [0]{}: box 0x411-0x41d (12)
0x410| 00 00 00 0c | .... | size: 12 0x411-0x415 (4)
0x410| 75 72 6c 20 | url | type: "url " 0x415-0x419 (4)
0x410| 75 72 6c 20 | url | type: "url" 0x415-0x419 (4)
0x410| 00 | . | version: 0 0x419-0x41a (1)
0x410| 00 00 01 | ... | flags: 1 0x41a-0x41d (3)
| | | data: "" 0x41d-0x41d (0)

View File

@ -178,7 +178,7 @@ $ fq -d mp4 dv mp3.mp4
| | | [0]{}: box 0x41f-0x42b (12)
0x410| 00| .| size: 12 0x41f-0x423 (4)
0x420|00 00 0c |... |
0x420| 75 72 6c 20 | url | type: "url " 0x423-0x427 (4)
0x420| 75 72 6c 20 | url | type: "url" 0x423-0x427 (4)
0x420| 00 | . | version: 0 0x427-0x428 (1)
0x420| 00 00 01 | ... | flags: 1 0x428-0x42b (3)
| | | data: "" 0x42b-0x42b (0)

Some files were not shown because too many files have changed in this diff Show More