1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 14:23:18 +03:00
fq/format/tiff/testdata/infinite.fqtest
Mattias Wadman 3b717c3ba4 interp: Add to/from<encoding> for some common serialzations, encodings and hashes
Add toxml/fromxml for XML encoding, mighe be lossy on ordering
fromxml has {seq:bool} to add #seq attributes to improve ordering
toxml has {indent:number} to choose space indent depth

Add tojson, same as in jq but also has {indent:number} options

Add toyaml/fromyaml for YAML

Add totoml/fromtoml for TOML

Add tojq/fromjq for jq-flavored JSON (optional quotes for keys, comments and trailing commas support)

Add tocsv/fromcsv for CSV
formcvs takes {comma:string, comment:string} for custom separtor and comment character

Rename/split hex into tohex/fromhex
Rename/split base64 into tobase64/frombase64
tobase64/frombase64 takes {encoding:string} option for base64 flavour (std, url, rawstd, rawurl)

Add to/from<format> urlpath, urlquery, url, xmlentities, base64, hex

Add to<hash> md4, md5, sha1, sha256, sha512, sha3_224, sha3_256, sha3_384, sha3_512

Add to/from<encoding> iso8859-1, utf8, utf16, utf16le, utf16be
2022-05-28 16:31:20 +02:00

14 lines
1.1 KiB
Plaintext

$ fq.go -n '"SUkqAAwAAAAwMDAwAQAwMDAwMDAwMDAwMDAhAAAAMDAwAAAhAAAA" | frombase64 | tiff'
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (tiff)
| | | error: tiff: error at position 0x27: ifd loop detected for 33
0x00|49 49 2a 00 |II*. | endian: "little-endian" (0x49492a00)
0x00|49 49 |II | order: "II" (valid)
0x00| 2a 00 | *. | integer_42: 42 (valid)
0x00| 0c 00 00 00 | .... | first_ifd: 12
0x00| 30 30 30 30 | 0000 | unknown0: raw bits
0x00| 01 00 30 30| ..00| ifds[0:2]:
0x10|30 30 30 30 30 30 30 30 30 30 21 00 00 00 30 30|0000000000!...00|
0x20|30 00 00 21 00 00 00| |0..!...| |
0x10| 30 30| 00| unknown1: raw bits
0x20|30 |0 |