This is a Go library for detecting the MIME type of files using magic number signatures. It implements a hierarchical detection tree rooted at 'application/octet-stream', allowing precise identification of over 200 file formats without any external dependencies. The library provides three detection entry points (byte slice, reader, file path) and supports concurrency via atomic and mutex locks. It includes custom parsers for CSV, JSON, OLE2/CDF, and MP3 frames, all optimized for performance and zero-copy where possible. The codebase is extensively tested with unit tests, fuzzing, and benchmarks, and is actively maintained with CI/CD, code scanning, and dependency automation. It is a standalone library with no runtime dependencies beyond the Go standard library.
gimli is a Rust library for reading and writing the DWARF debugging format, used by debuggers, profilers, and binary analysis tools. It provides zero-copy, lazy parsing of all standard DWARF sections (e.g., .debug_info, .debug_line, .debug_frame, .debug_names) across versions 2–5, including split DWARF (DWO/DWP) and supplementary object files. The library is split into `read` and `write` modules, with a conversion pipeline to transform parsed debug data back into DWARF. It is designed to be `no_std` compatible (with alloc) and uses trait-based abstractions for readers/writers, allowing custom backing stores. Example CLI tools (dwarfdump, simple, convert) demonstrate real-world usage. The codebase is highly modular, with extensive unit tests, fuzzing, and benchmarks, and emphasizes correctness, performance, and cross-platform support (32/64-bit, little/big endian).
This repository is primarily educational documentation explaining various audio file formats, presented as a technical booklet. It covers PCM, WAV, MP3, AAC, FLAC, HLS, and DASH formats, detailing their structure, headers, and technical characteristics. While framed as documentation, it includes practical, executable Python examples for parsing and validating audio file formats in the misc/ directory. The repository's value lies in its combination of conceptual explanations and working code examples. The documentation provides clear, accessible overviews of complex audio formats, while the parsers demonstrate how to implement format-specific logic for tasks like frame validation, header extraction, and metadata parsing. These examples are not merely theoretical—they are functional implementations that correctly follow format specifications. Although the repository doesn't process specific datasets or perform data analysis, it equips readers with the knowledge and tools to work with audio data. The parsers solve recurring problems in audio processing: validating file integrity, extracting metadata, and understanding format structure. This hybrid nature—documentation with practical code—makes it uniquely valuable for engineers needing to work with audio formats.
Apktool is a command-line tool for reverse engineering Android APK files. It decodes binary resources (resources.arsc, AndroidManifest.xml, 9-patch images) back to nearly original form, disassembles DEX bytecode into Smali assembly using baksmali, and provides a rebuild pipeline that reassembles and signs the APK via aapt2 and apksigner. The tool manages Android framework APK installations to resolve resource references during decoding. The architecture is a multi-module Gradle project: a core library (apktool-lib) exposing programmatic APIs (ApkDecoder, ApkBuilder, ResTable, Framework), and a CLI wrapper (apktool-cli) that provides commands like decode, build, install-framework, and list-frameworks. Supporting libraries (brut.j.util, brut.j.dir, brut.j.yaml, brut.j.xml) handle I/O, directory abstraction, YAML metadata, and XML serialization. External dependencies include Google's aapt2 binary (bundled per platform) and the smali/baksmali libraries for DEX compilation. The codebase demonstrates deep knowledge of Android binary formats, with custom parsers for chunked resource tables, binary XML, and resource qualifiers, and includes extensive regression tests covering edge cases and security vulnerabilities.
UTIF.js is a comprehensive, single-file JavaScript library for decoding and encoding TIFF, EXIF, DNG, CR2, NEF, and other TIFF-based image formats. It is the primary TIFF library used by the Photopea online image editor. The library handles a wide variety of compression schemes (JPEG, LZW, PackBits, Fax, Deflate, Nikon, Panasonic, etc.) and supports various bit depths, color spaces, and photometric interpretations. It provides a straightforward API: `UTIF.decode()` for parsing TIFF headers, `UTIF.decodeImage()` for decompressing pixel data, and `UTIF.toRGBA8()` for converting to RGBA. The code is monolithic, embedding its own JPEG decoder and many other decoders directly in a single file. While functional and battle-tested, the code is dense, uses ES5 patterns, and contains many minified-like variable names, making it less readable and maintainable. The library depends on the outdated `pako` v1.x for deflate compression. It is a mature, production-ready library but with medium technical drift and a maintenance status that appears active (last commit dated 2026-05-04, though this date is likely a mistake).