Mattias Wadman
e238f292af
repl: Speedup multi input to sub-repl
...
Rewrite non-sub-repl queries as "q" -> ".[] | q" and pass in inputs as array.
Before each input did an eval.
Also fixup error message a bit, skip line:column when they dont make sense.
2022-02-18 01:13:45 +01:00
Mattias Wadman
c58ba28da1
mpeg_spu: Fatal error on unknown cmd
...
Also fixes fuzzer issues
2022-02-12 16:11:41 +01:00
Mattias Wadman
3bab3d659a
aac_frame: Only try decode object types we know about
...
Fixes issue failing on unknown or future aac standards
Also add missing object type passing for matroska
2022-02-07 16:02:56 +01:00
Mattias Wadman
0829c167cc
asn1_ber: Add decoder
...
Basic support, can also do CER and DER but without any extra validation.
No schema support.
Redo format doc.md usage a bit, now format/<dir>/<format>.md instead.
Related to #20
2022-02-06 22:13:03 +01:00
Mattias Wadman
7c5215347d
bitio,decode: Refactor bitio usage and make buffer slicing more correct
...
Remove bitio.Buffer layer. bitio.Buffer was a kitchen sink layer with helpers
now it's just a buffer and most functions have been moved to decode instead.
bitio package now only have primitive types and functions simialar to standard
library io and bytes packages.
Make nearly eveything internally use bitio.Bit* interfaces so that slicing work
correctly this will also make it possible to start experimenting with more
complicated silcing helpers, ex things like:
breplace(.header.bitrate; 123) to get a new buffer with bitrate changed.
2022-02-04 21:41:53 +01:00
Mattias Wadman
fc0aacb654
interp: Cleanup display aliases, now: d, da, dd, dv, ddv
...
Think it makes sense to have them all start with d.
Also f is often used as function argument name.
2022-01-28 18:25:38 +01:00
Mattias Wadman
febce5a5a4
mpeg_spu: Fatal error on infinite loop
2022-01-24 16:53:55 +01:00
Mattias Wadman
edad481878
num,mathextra: Rename num package to mathextra
...
Think it makes more sense
2022-01-15 19:00:42 +01:00
Mattias Wadman
681dbc26b7
elf,ar: Add ar decoder, improved elf decoder
...
Add x86, 386, arm64, arm v6, arm v7 linux elf test files
2022-01-05 22:05:09 +01:00
Mattias Wadman
9f08af31df
mpeg,aac: Factor out escape value decoding
2021-12-14 17:34:38 +01:00
Mattias Wadman
6ed2e2e72e
interp: dump: Indicate arrays using jq-syntax
...
Related to #16
2021-12-08 16:24:28 +01:00
Mattias Wadman
2fc0a71a47
decode: Refactor scalar usage
...
Move scalar into own package.
Split scalar code into decode related scalar code (that reads etc) and
scalar code that just transform the scalar value.
Use a scalar.Mapper interface instead of just a function.
Make mappers, assert and validat impement the interface.
2021-12-02 17:39:26 +01:00
Mattias Wadman
f801cc0af7
decode: Rename s/FieldTryFormat/TryFieldFormat for consistency
2021-11-30 15:29:41 +01:00
Mattias Wadman
f55b1af6ac
inet: Add tcp and ipv4 reassembly
...
Also add tcp_stream and udp_payload to decode content
2021-11-29 18:42:18 +01:00
Mattias Wadman
3bf1a57cfa
avc: Cleanup and add color names etc
2021-11-28 17:29:56 +01:00
Mattias Wadman
4f8d03731d
format,decode: Some crc and endian refactor
2021-11-24 12:01:01 +01:00
Mattias Wadman
e6cb708d38
mpeg: Nicer sym and description
2021-11-22 17:02:07 +01:00
Mattias Wadman
fdb811ec54
gojqextra,decode: Add generic lazy JQValue
2021-11-22 01:23:59 +01:00
Mattias Wadman
f40320b04c
decode: Remove D.Scalar* and add d.(Try)FieldScala*Fn instead
...
Idea is scalar fn should not read
2021-11-21 13:08:18 +01:00
Mattias Wadman
d1b514edeb
format: Some claeanup
2021-11-19 16:44:06 +01:00
Mattias Wadman
527f917698
mp3: Error if > 5 unique header configs
...
Hopefully make it less likely to missprobe
2021-11-19 16:22:18 +01:00
Mattias Wadman
7af191d974
decode: Move io helper into *D
2021-11-18 01:17:41 +01:00
Mattias Wadman
c083a9e475
decode: Fix MapRawToScalar regression
2021-11-17 17:14:19 +01:00
Mattias Wadman
986d5ecc50
decode: Move registry package to decode/registry and add a format group type
2021-11-17 16:59:56 +01:00
Mattias Wadman
5d98a6949a
decode: Refactor Error/Fatal into printf functions
2021-11-17 16:26:13 +01:00
Mattias Wadman
ede2e77975
decode: Nicer scalar template and add doc
2021-11-17 16:13:10 +01:00
Mattias Wadman
b66ed32614
decode,interp: Make fuzzing work again and cleanup fatal/error code
2021-11-16 17:11:26 +01:00
Mattias Wadman
f9f866000e
interp,decode: Add force option to ignore asserts
2021-11-16 13:03:56 +01:00
Mattias Wadman
1b32b42f93
decode: Major decode API refactor
...
Generate more code
More generic and comfortable API
Improve and Update format decoder to new API
Add some more format tests
2021-11-15 21:12:07 +01:00
Mattias Wadman
cc5f405554
interp,format: Update tests after decode refactor/tosym/toactual
2021-11-05 17:29:23 +01:00
Mattias Wadman
6a15625587
interp,decode: Refactor out Scalar from Value and merge Array/Struct into Compound
...
Also add tosym, toactual
2021-11-05 17:29:22 +01:00
Mattias Wadman
691688022f
fqtest: Refactor our script part to own package
...
Hopefully can be reused for docs generation
2021-10-06 18:49:03 +02:00
Mattias Wadman
3ff0c9b5e0
lint: Enable errcheck adnd revive
2021-09-27 11:01:14 +02:00
Mattias Wadman
ed21f36b23
mp3_frame: Rename samples_per_frame to sample_count
2021-09-20 18:54:20 +02:00
Mattias Wadman
ee972f490d
dump: Add ascii header
2021-09-16 22:40:03 +02:00
Mattias Wadman
6ee7977c53
decode,format: Allow root array
2021-09-16 16:27:47 +02:00
Mattias Wadman
473b2243c9
decode: Simplify and move format arg into DecodeOptions
2021-09-16 15:29:11 +02:00
Mattias Wadman
777191f685
avc: Correct sign expgolomb decode
2021-09-15 00:32:00 +02:00
Mattias Wadman
776a6b3136
decode: Reuse read buffer per decode to speed things up
2021-09-14 18:54:59 +02:00
Mattias Wadman
798141a0b0
format: Cleanup comments
2021-09-14 17:01:25 +02:00
Mattias Wadman
4344b621da
mp3: Only look for supported mp3 sync headers
2021-09-12 13:08:55 +02:00
Mattias Wadman
4242bf6013
*_annexb: Refactor into avc/hevc_annexb
2021-09-12 13:08:54 +02:00
Mattias Wadman
9f55b6e619
decode: Refactor and add symbol struct and mapping
2021-09-12 13:08:53 +02:00
Mattias Wadman
f4b11b4be2
mpeg_annexb: Add format
2021-09-12 13:08:53 +02:00
Mattias Wadman
d23edaa4a5
fq: Rename bits/0 bytes/0 to tobits tobytes, remove string/0
2021-09-12 13:08:53 +02:00
Mattias Wadman
4b48828b32
format: Rename source file to match format name
2021-09-12 13:08:51 +02:00
Mattias Wadman
f1507f7f65
mod: Use proper path and dont use replace
2021-09-12 13:08:50 +02:00
Mattias Wadman
c155c89ba3
decode: Rename format *Decode to *Format
2021-09-12 13:08:50 +02:00
Mattias Wadman
8dc0f06b62
cli: Add completion tests
2021-09-12 13:08:49 +02:00
Mattias Wadman
60df04b098
mp3_frame: Only supports layer 3, fixes some probe issues
2021-09-12 13:08:49 +02:00