1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 09:56:07 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
Mattias Wadman
9b683cd839 deocde: Cleanup some io panic(err) 2021-12-07 17:33:57 +01:00
Mattias Wadman
713ffe4770 scalar: Add Require* and Require/Validate/AssertRange* 2021-12-07 15:50:55 +01:00
Mattias Wadman
75aa47556a decode: Generate Try?Scalar* methods for readers too 2021-12-04 19:05:16 +01:00
Mattias Wadman
d48ebc12ee decode: Simplify Compound.Children
Not a array reference anymore but instead pass around Compound reference
2021-12-03 00:06:11 +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
d1e1cd98c2 decode: Fix walk root depth issue causing dump to indent incorrectly 2021-11-30 12:51:52 +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
7b7faaf02b pcap: Add pcap, pcapng, ether8023, ipv4, udp, udp 2021-11-24 18:13:00 +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
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
0480a2f722 decode: Some format decode and sub buffer work 2021-11-20 18:56:59 +01:00
Mattias Wadman
278e909a2f mp4: Add tapt, prof, enof and clap boxes 2021-11-19 15:29:49 +01:00
Mattias Wadman
d838d2f613 zip: Add format decoder 2021-11-19 00:22:26 +01:00
Mattias Wadman
ffb5adff1d registry: Move to pkg/registry, feels better 2021-11-18 01:22:21 +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
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
826c5094f2 decode: Add Generated header for scalar 2021-11-17 10:19: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
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
58ba84ff93 decode,interp: Add RecoverableErrorer interface instead of enumerate 2021-11-01 17:41:39 +01:00
Mattias Wadman
88eade9ab9 ogg: Add flac support
Refactor flac_streaminfo and flac_metadata from flac_metadatablocks
Some deocde bitbuf api cleanup
2021-10-29 18:30:16 +02:00
Mattias Wadman
95ec5e1077 Cleanup and rename s/BufferView/BufferRange 2021-10-21 00:48:30 +02:00
Mattias Wadman
5052bae18e decode,interp: Refactor to allow decode/fillgap a range 2021-10-19 14:38:11 +02:00
Mattias Wadman
6ff5acae03 gif: Support GIF87a 2021-10-19 01:53:37 +02:00
Mattias Wadman
8eaba88a10 decode: Refactor walk code a bit, add WalkRoot* to stay inside one root 2021-10-18 15:06:08 +02:00
Mattias Wadman
20021f48ec bitio: Handle < 0 nbits
Read/Write64 panic on < 0 bits
Readers return error
2021-09-29 11:53:21 +02:00
Mattias Wadman
c997536f14 interp: Add root, buffer_root, format_root, parent and parents 2021-09-28 01:46:29 +02:00
Mattias Wadman
3ff0c9b5e0 lint: Enable errcheck adnd revive 2021-09-27 11:01:14 +02:00
Mattias Wadman
3e7e133047 interp: Move formats func def to jq 2021-09-21 16:42:35 +02:00
Mattias Wadman
d4142b875c decode,png: Add FieldFormatReaderLen, refactor out zlib to format 2021-09-19 20:49:15 +02:00
Mattias Wadman
3db11d3fa8 decode: Add UTF8Fn functions and trim some null terminated strings 2021-09-17 22:13:35 +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
26d615b852 decode: Move name/description into DecodeOptions 2021-09-16 14:42:32 +02:00
Mattias Wadman
c7416e6dcb decode, interp: More buffer reuse 2021-09-16 12:24:53 +02:00
Mattias Wadman
6207fcc8f0 decode: Pass context to be able to cancel properly 2021-09-16 10:32:29 +02:00
Mattias Wadman
c17483dbe0 decode: Fix accidental rename 2021-09-15 00:52:57 +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
4344b621da mp3: Only look for supported mp3 sync headers 2021-09-12 13:08:55 +02:00
Mattias Wadman
da386ea282 mp3: Be more relaxed with zero padding, just warn 2021-09-12 13:08:55 +02:00
Mattias Wadman
a49e924d5f decode: Use golang.org/x/text for text decoding 2021-09-12 13:08:55 +02:00