Mattias Wadman
5ff67e4cfe
formats: Sym and field name cleanup to be more jq friendly
2022-04-05 13:59:57 +02: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
6ed2e2e72e
interp: dump: Indicate arrays using jq-syntax
...
Related to #16
2021-12-08 16:24:28 +01:00
Mattias Wadman
3601fe3bcb
gzip: fuzz: Don't uncompress on unknown compress method (nil create reader fn)
2021-12-06 15:41:39 +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
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
9d116df799
decode: Rework use of TryFieldReaderRangeFormat
...
Handle failure better
2021-11-24 15:25:27 +01:00
Mattias Wadman
4f8d03731d
format,decode: Some crc and endian refactor
2021-11-24 12:01:01 +01:00
Mattias Wadman
aab32cf2db
gojqextra,interp: Add lazy string to speed usage of decode value buffer where string is not used
2021-11-21 21:27:44 +01:00
Mattias Wadman
ee611a489a
gzip,bzip2: Calculate CRC
2021-11-21 20:13:42 +01:00
Mattias Wadman
0480a2f722
decode: Some format decode and sub buffer work
2021-11-20 18:56:59 +01:00
Mattias Wadman
7af191d974
decode: Move io helper into *D
2021-11-18 01:17:41 +01:00
Mattias Wadman
6fba1a8125
decode: Fix bitbuf root handling a bit
2021-11-18 01:17:15 +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
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
ee972f490d
dump: Add ascii header
2021-09-16 22:40:03 +02:00
Mattias Wadman
473b2243c9
decode: Simplify and move format arg into DecodeOptions
2021-09-16 15:29:11 +02:00
Mattias Wadman
c7416e6dcb
decode, interp: More buffer reuse
2021-09-16 12:24:53 +02:00
Mattias Wadman
798141a0b0
format: Cleanup comments
2021-09-14 17:01:25 +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
970465996c
Init
2021-09-12 13:08:42 +02:00