[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5039":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":16,"starSnapshotCount":16,"syncStatus":19,"lastSyncTime":42,"discoverSource":43},5039,"fq","wader\u002Ffq","wader","jq for binary formats - tool, language and decoders for working with binary and text formats","",null,"Go",10521,248,50,35,0,6,28,2,72.99,"Other",false,"master",true,[26,27,28,29,30,31,32,33,34,35,36,37,38],"binary","cli","decode","go","golang","hexdump","jq","json","pcap","query","repl","tls","xml","2026-06-12 04:00:24","# fq\n\nTool, language and decoders for working with binary data.\n\nTLDR: it aims to be jq, hexdump, dd and gdb for files combined into one.\n\n![fq demo](doc\u002Fdemo.svg)\n\nBasic usage is `fq . file`, `fq d file` or `fq 'some query' file ...`.\n\nFor details see [usage.md](doc\u002Fusage.md).\n\n### Background\n\nfq is inspired by the [jq](https:\u002F\u002Fjqlang.github.io\u002Fjq\u002F) 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.\n\nIt 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\u002Ffrom hex, number bases, search for patterns etc.\n\n### Goals\n\n- Make binaries more accessible, queryable and sliceable.\n- Nested formats and bit-oriented decoding.\n- Quick and comfortable CLI tool.\n- Bits and bytes transformations.\n\n### Hopes\n\n- Make it useful enough that people want to help improve it.\n- Inspire people to create similar tools.\n\n### Supported formats\n\n[fq -rn -L doc 'include \"formats\"; formats_list']: sh-start\n\n[aac_frame](doc\u002Fformats.md#aac_frame),\nadts,\nadts_frame,\naiff,\namf0,\napev2,\n[apple_bookmark](doc\u002Fformats.md#apple_bookmark),\nar,\n[asn1_ber](doc\u002Fformats.md#asn1_ber),\nav1_ccr,\nav1_frame,\nav1_obu,\navc_annexb,\n[avc_au](doc\u002Fformats.md#avc_au),\navc_dcr,\n[avc_nalu](doc\u002Fformats.md#avc_nalu),\navc_pps,\n[avc_sei](doc\u002Fformats.md#avc_sei),\navc_sps,\n[avi](doc\u002Fformats.md#avi),\n[avro_ocf](doc\u002Fformats.md#avro_ocf),\n[bencode](doc\u002Fformats.md#bencode),\nbitcoin_blkdat,\n[bitcoin_block](doc\u002Fformats.md#bitcoin_block),\nbitcoin_script,\nbitcoin_transaction,\n[bits](doc\u002Fformats.md#bits),\n[bplist](doc\u002Fformats.md#bplist),\nbsd_loopback_frame,\n[bson](doc\u002Fformats.md#bson),\n[bytes](doc\u002Fformats.md#bytes),\nbzip2,\n[caff](doc\u002Fformats.md#caff),\n[cbor](doc\u002Fformats.md#cbor),\n[csv](doc\u002Fformats.md#csv),\ndns,\ndns_tcp,\nelf,\nether8023_frame,\nexif,\nfairplay_spc,\n[fit](doc\u002Fformats.md#fit),\nflac,\n[flac_frame](doc\u002Fformats.md#flac_frame),\nflac_metadatablock,\nflac_metadatablocks,\nflac_picture,\nflac_streaminfo,\ngif,\ngzip,\nhevc_annexb,\n[hevc_au](doc\u002Fformats.md#hevc_au),\nhevc_dcr,\nhevc_nalu,\nhevc_pps,\nhevc_sps,\nhevc_vps,\n[html](doc\u002Fformats.md#html),\nicc_profile,\nicmp,\nicmpv6,\nid3v1,\nid3v11,\nid3v2,\nipv4_packet,\nipv6_packet,\njp2c,\njpeg,\njson,\njsonl,\n[leveldb_descriptor](doc\u002Fformats.md#leveldb_descriptor),\n[leveldb_log](doc\u002Fformats.md#leveldb_log),\n[leveldb_table](doc\u002Fformats.md#leveldb_table),\n[luajit](doc\u002Fformats.md#luajit),\n[macho](doc\u002Fformats.md#macho),\nmacho_fat,\n[markdown](doc\u002Fformats.md#markdown),\n[matroska](doc\u002Fformats.md#matroska),\n[midi](doc\u002Fformats.md#midi),\n[moc3](doc\u002Fformats.md#moc3),\n[mp3](doc\u002Fformats.md#mp3),\nmp3_frame,\nmp3_frame_vbri,\nmp3_frame_xing,\n[mp4](doc\u002Fformats.md#mp4),\nmpeg_asc,\nmpeg_es,\nmpeg_pes,\nmpeg_pes_packet,\nmpeg_spu,\nmpeg_ts,\n[msgpack](doc\u002Fformats.md#msgpack),\n[negentropy](doc\u002Fformats.md#negentropy),\n[nes](doc\u002Fformats.md#nes),\nogg,\nogg_page,\n[opentimestamps](doc\u002Fformats.md#opentimestamps),\nopus_packet,\n[pcap](doc\u002Fformats.md#pcap),\npcapng,\n[pg_btree](doc\u002Fformats.md#pg_btree),\n[pg_control](doc\u002Fformats.md#pg_control),\n[pg_heap](doc\u002Fformats.md#pg_heap),\npng,\nprores_frame,\n[protobuf](doc\u002Fformats.md#protobuf),\nprotobuf_widevine,\npssh_playready,\n[rtmp](doc\u002Fformats.md#rtmp),\nsafetensors,\nsll2_packet,\nsll_packet,\n[stl](doc\u002Fformats.md#stl),\n[tap](doc\u002Fformats.md#tap),\ntar,\ntcp_segment,\ntiff,\n[tls](doc\u002Fformats.md#tls),\ntoml,\n[tzif](doc\u002Fformats.md#tzif),\n[tzx](doc\u002Fformats.md#tzx),\nudp_datagram,\nvorbis_comment,\nvorbis_packet,\nvp8_frame,\nvp9_cfm,\nvp9_frame,\nvpx_ccr,\n[wasm](doc\u002Fformats.md#wasm),\nwav,\nwebp,\n[xml](doc\u002Fformats.md#xml),\nyaml,\n[zip](doc\u002Fformats.md#zip)\n\n[#]: sh-end\n\nIt can also work with some common text formats like URLs, hex, base64, PEM etc and for some serialization formats like XML, YAML, etc. it can transform both from and to jq values.\n\nFor details see [formats.md](doc\u002Fformats.md) and [usage.md](doc\u002Fusage.md).\n\n## Presentations and media\n\n- [PBS Tidbit 8 of Y: Interview with jq Maintainer Mattias Wadman](https:\u002F\u002Fpbs.bartificer.net\u002Ftidbit8) - English podcast episode about jq and some fq.\n- [Kodsnack 585 - Polymorfisk JSON](https:\u002F\u002Fkodsnack.se\u002F585\u002F) - Swedish podcast episode about jq and fq\n- \"fq - jq for binary formats\" at [FOSDEM 2023](https:\u002F\u002Ffosdem.org\u002F2023\u002F) - [video & slides](https:\u002F\u002Ffosdem.org\u002F2023\u002Fschedule\u002Fevent\u002Fbintools_fq\u002F)\n- \"fq - jq for binary formats\" at [No time to wait 6](https:\u002F\u002Fmediaarea.net\u002FNoTimeToWait6) - [video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=-Pwt5KL-xRs&t=1450s) - [slides](doc\u002Fpresentations\u002Fnttw6\u002Ffq-nttw6-slides.pdf)\n- \"fq - jq for binary formats\" at [Binary Tools Summit 2022](https:\u002F\u002Fbinary-tools.net\u002Fsummit.html) - [video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=GJOq_b0eb-s&list=PLTj8twuHdQz-JcX7k6eOwyVPDB8CyfZc8&index=1) - [slides](doc\u002Fpresentations\u002Fbts2022\u002Ffq-bts2022-v1.pdf)\n\n## Install\n\nUse one of the methods listed below or download a pre-built [release](https:\u002F\u002Fgithub.com\u002Fwader\u002Ffq\u002Freleases) for macOS, Linux or Windows. Unarchive it and move the executable to `PATH` etc.\n\nOn macOS if you don't install using one of the method below then you might have to manually allow the binary to run. This can be done by trying to run the binary, ignore the warning and then go into security preference and allow it. Same can be done with these commands:\n\n```sh\nxattr -d com.apple.quarantine fq\n# for macOS version before Sequoia you might need this also\nspctl --add fq\n```\n\n### Homebrew (macOS)\n\n```sh\nbrew install wader\u002Ftap\u002Ffq\n```\n\n### MacPorts\n\nOn macOS, `fq` can also be installed via [MacPorts](https:\u002F\u002Fwww.macports.org).  More details [here](https:\u002F\u002Fports.macports.org\u002Fport\u002Ffq\u002F).\n\n```sh\nsudo port install fq\n```\n\n### Windows\n\n`fq` can be installed via [scoop](https:\u002F\u002Fscoop.sh\u002F).\n\n```powershell\nscoop install fq\n```\n\n### Arch Linux\n\n`fq` can be installed from the [extra repository](https:\u002F\u002Farchlinux.org\u002Fpackages\u002Fextra\u002Fx86_64\u002Ffq\u002F) using [pacman](https:\u002F\u002Fwiki.archlinux.org\u002Ftitle\u002FPacman):\n\n```sh\npacman -S fq\n```\n\nYou can also build and install the development (VCS) package using an [AUR helper](https:\u002F\u002Fwiki.archlinux.org\u002Findex.php\u002FAUR_helpers):\n\n```sh\nparu -S fq-git\n```\n### Guix\n\n```sh\nguix shell fq -- fq --help # in develompen shell\nguix install fq            # into current profile\n```\n\n### Nix\n\n```sh\nnix-shell -p fq\n```\n\n### FreeBSD\n\nUse the [fq](https:\u002F\u002Fcgit.freebsd.org\u002Fports\u002Ftree\u002Fmisc\u002Ffq) port.\n\n### Alpine\n\nCurrently in edge testing but should work fine in stable also.\n\n```\napk add -X http:\u002F\u002Fdl-cdn.alpinelinux.org\u002Falpine\u002Fedge\u002Ftesting fq\n```\n\n### Build from source\n\nMake sure you have [go](https:\u002F\u002Fgo.dev) 1.22 or later installed.\n\nTo install directly from git repository (no git clone needed):\n```sh\n# build and install latest release\ngo install github.com\u002Fwader\u002Ffq@latest\n\n# build and install latest master\ngo install github.com\u002Fwader\u002Ffq@master\n\n# copy binary to $PATH if needed\ncp \"$(go env GOPATH)\u002Fbin\u002Ffq\" \u002Fusr\u002Flocal\u002Fbin\n```\n\nTo build, run and test from source:\n```sh\n# build and run\ngo run .\n# build and run with arguments\ngo run . -d mp3 . file.mp3\n# just build\ngo build -o fq .\n# run all tests and build binary\nmake test fq\n```\n\n## Development and adding a new decoder\n\nSee [dev.md](doc\u002Fdev.md)\n\n## Thanks and related projects\n\nThis project would not have been possible without [itchyny](https:\u002F\u002Fgithub.com\u002Fitchyny)'s\njq implementation [gojq](https:\u002F\u002Fgithub.com\u002Fitchyny\u002Fgojq). I also want to thank\n[HexFiend](https:\u002F\u002Fgithub.com\u002FHexFiend\u002FHexFiend) for inspiration and ideas and [stedolan](https:\u002F\u002Fgithub.com\u002Fstedolan)\nfor inventing the [jq](https:\u002F\u002Fgithub.com\u002Fstedolan\u002Fjq) language.\n\n### Similar or related works\n\n#### Tools\n\n- [HexFiend](https:\u002F\u002Fgithub.com\u002FHexFiend\u002FHexFiend) - Hex editor for macOS with format template support.\n- [ImHex](https:\u002F\u002Fgithub.com\u002FWerWolv\u002FImHex) - A Hex Editor for Reverse Engineers.\n- [binspector](https:\u002F\u002Fgithub.com\u002Fbinspector\u002Fbinspector) - Binary format analysis tool with query language and REPL.\n- [kaitai](https:\u002F\u002Fkaitai.io) - Declarative binary format parsing.\n- [Wireshark](https:\u002F\u002Fwww.wireshark.org) - Decodes network traffic (tip: `tshark -T json`).\n- [MediaInfo](https:\u002F\u002Fmediaarea.net\u002Fen\u002FMediaInfo) - Analyze media files  (tip `mediainfo --Output=JSON` and `mediainfo --Details=1`).\n- [GNU poke](https:\u002F\u002Fwww.jemarch.net\u002Fpoke) - The extensible editor for structured binary data.\n- [ffmpeg\u002Fffprobe](https:\u002F\u002Fffmpeg.org) - Powerful media libraries and tools.\n- [hexdump](https:\u002F\u002Fgit.kernel.org\u002Fpub\u002Fscm\u002Futils\u002Futil-linux\u002Futil-linux.git\u002Ftree\u002Ftext-utils\u002Fhexdump.c) - Hex viewer tool.\n- [hex](https:\u002F\u002Fgit.janouch.name\u002Fp\u002Fhex) - Interactive hex viewer with format support via lua.\n- [hachoir](https:\u002F\u002Fgithub.com\u002Fvstinner\u002Fhachoir) - General python library for working binary data.\n- [scapy](https:\u002F\u002Fscapy.net) - Decode\u002FEncode formats, focus on network protocols.\n\n#### Projects and Standards\n\n- [Let's Solve the File Format Problem](http:\u002F\u002Ffileformats.archiveteam.org).\n- [PRONOM](https:\u002F\u002Fwww.nationalarchives.gov.uk\u002FPRONOM\u002F) file format registry.\n- [Sustainability of Digital Formats](https:\u002F\u002Fwww.loc.gov\u002Fpreservation\u002Fdigital\u002Fformats\u002F) at Library of Congress.\n- [Data Format Description Language (DFDL)](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FData_Format_Description_Language).\n\n## TODO and ideas\n\nSee [TODO.md](doc\u002FTODO.md)\n\n## License\n\n`fq` is distributed under the terms of the MIT License.\n\nSee the [LICENSE](LICENSE) file for license details.\n\nLicenses of direct dependencies:\n\n- Forked version of gojq - https:\u002F\u002Fgithub.com\u002Fitchyny\u002Fgojq\u002Fblob\u002Fmain\u002FLICENSE (MIT)\n- github.com\u002Fergochat\u002Freadline - https:\u002F\u002Fgithub.com\u002Fergochat\u002Freadline\u002Fblob\u002Fmaster\u002FLICENSE (MIT)\n- github.com\u002FBurntSushi\u002Ftoml - https:\u002F\u002Fgithub.com\u002FBurntSushi\u002Ftoml\u002Fblob\u002Fmaster\u002FCOPYING (MIT)\n- github.com\u002Fcreasty\u002Fdefaults - https:\u002F\u002Fgithub.com\u002Fcreasty\u002Fdefaults\u002Fblob\u002Fmaster\u002FLICENSE (MIT)\n- github.com\u002Fgomarkdown\u002Fmarkdown - https:\u002F\u002Fgithub.com\u002Fgomarkdown\u002Fmarkdown\u002Fblob\u002Fmaster\u002FLICENSE.txt (BSD)\n- github.com\u002Fgopacket\u002Fgopacket - https:\u002F\u002Fgithub.com\u002Fgopacket\u002Fgopacket\u002Fblob\u002Fmaster\u002FLICENSE (BSD)\n- github.com\u002Fmitchellh\u002Fcopystructure - https:\u002F\u002Fgithub.com\u002Fmitchellh\u002Fcopystructure\u002Fblob\u002Fmaster\u002FLICENSE (MIT)\n- github.com\u002Fmitchellh\u002Fmapstructure - https:\u002F\u002Fgithub.com\u002Fmitchellh\u002Fmapstructure\u002Fblob\u002Fmaster\u002FLICENSE (MIT)\n- github.com\u002Fpmezard\u002Fgo-difflib - https:\u002F\u002Fgithub.com\u002Fpmezard\u002Fgo-difflib\u002Fblob\u002Fmaster\u002FLICENSE (BSD)\n- golang\u002Fsnappy - https:\u002F\u002Fgithub.com\u002Fgolang\u002Fsnappy\u002Fblob\u002Fmaster\u002FLICENSE (BSD)\n- golang\u002Fx\u002F* - https:\u002F\u002Fgithub.com\u002Fgolang\u002Ftext\u002Fblob\u002Fmaster\u002FLICENSE (BSD)\n- gopkg.in\u002Fyaml.v3 - https:\u002F\u002Fgithub.com\u002Fgo-yaml\u002Fyaml\u002Fblob\u002Fv3\u002FLICENSE (MIT)\n- Parts of go crypto\u002Ftls and github.com\u002Fzmap\u002Fzcrypto - https:\u002F\u002Fgithub.com\u002Fzmap\u002Fzcrypto\u002Fblob\u002Fmaster\u002FLICENSE (Apache)\n","fq 是一个用于处理二进制和文本格式的工具，集成了类似 jq、hexdump、dd 和 gdb 的功能。它支持多种文件格式（如 MP4、FLAC、JPEG 等）及协议（如 JSON、XML、PCAP 等），并提供了一个强大的查询语言来解析、转换和操作这些数据。fq 采用 Go 语言编写，具有高性能和易用性，适用于需要对复杂或嵌套的二进制结构进行深入分析与调试的场景，比如多媒体编码器容器检查、网络流量分析等。此外，fq 还具备交互式命令行界面，支持自动补全等功能，使得用户能够更加便捷地探索和理解二进制数据。","2026-06-11 03:02:11","top_language"]