Commit Graph
45 Commits
Author SHA1 Message Date
4DBug 175ca9e823 archive/wad2, image/lmp, image/spr, data/q3shader, data/q3skin
WAD2 / WAD3 with miptex / qpic / conchars / font / palette images and addImage; Quake .lmp pictures, palette and
colormap (palette never embedded); Quake / Half-Life / SPR32 sprites with frame groups; Quake III shader scripts and
.skin files. Miptex gains qpic decode / encode and palette mapping; Pixels.keyed keeps the key colour (alpha 0).
2026-11-01 19:17:00 -06:00
4DBug 086b39a595 tests: restore fixture provenance lines dropped with long headers 2026-11-01 01:52:13 -05:00
4DBug 653ce4e002 tests/archive: comments: wrap long headers 2026-11-01 01:51:09 -05:00
4DBug 96602286f8 tests/archive: comments: specs only 2026-11-01 01:49:50 -05:00
4DBug 22ddcd78fa rename: src/Formats -> src/Rosetta, @formats -> @rosetta requires, build/luajit/rosetta + rosetta._compat, build/roblox/Rosetta, ROSETTA_* env/globals, writer vendor strings 2026-11-01 01:19:16 -05:00
4DBug b5cdd77a5b merge ws/arch2: cpio ar/deb rpm .Z lz4 iso lha arj zoo cab, uu/yenc/binhex/macbinary/applesingle, d64 adf fat, bdf pcf psf fon type1 eot hershey 2026-10-31 16:44:01 -05:00
4DBug 3e83879a6e merge ws/arch2-cab (archive/cab; codecs/compress/Lzx, Quantum; Deflate preset dictionary + mszip) 2026-10-31 16:27:11 -05:00
4DBug 79fd3c05dd merge master into ws/arch2 (ws/video2, ws/3d3, ws/game Archive.slice / collect) 2026-10-31 15:57:05 -05:00
4DBug 9761df1af1 ws-arch2-cab: codecs/compress/Quantum (CAB Quantum: 16-bit arithmetic decoder, the adaptive models with their rescale / re-sort rules, windows 2^10..2^21, one frame per CFDATA; written from the format descriptions) + cab Quantum folders, checked against cabextract on cabinets of a fixture Quantum compressor (tools/fixtures/_quantum.py) and libmspack's mszip_lzx_qtm sample 2026-10-31 15:50:37 -05:00
4DBug c54c8daff5 ws-arch2-cab: codecs/compress/Lzx (CAB LZX: windows 2^15..2^21, verbatim / aligned / uncompressed blocks, delta-coded trees, R0..R2, E8 translation, 32 KB frames; written from the spec) + cab LZX folders, checked against cabextract on cabinets of a fixture LZX compressor (tools/fixtures/_lzx.py) and libmspack's samples; Deflate.mszip (generic MSZIP blocks: CK + deflate, dictionary carried across blocks; for cab and later model/x); cab bench lines 2026-10-31 15:46:28 -05:00
4DBug 825c45b03c ws-arch2-cab: archive/cab (MSCF read: stored / MSZIP folders with the carried-over deflate dictionary, reserve areas, checksums, attributes, UTF-8 names, spanned files UNSUPPORTED; write: one stored / MSZIP folder) vs cabextract / gcab / 7z; Deflate.inflate gains an optional preset dictionary (5th argument, Inflate.raw 7th; backward compatible) 2026-10-31 15:37:25 -05:00
4DBug 242e38c4fe merge ws/arch2-unix (cpio, ar/deb, rpm, z, iso, lz4; containers/Cpio, Iso9660; codecs UnixCompress, Xxh32, Lz4 from ws/roblox) 2026-10-31 15:22:07 -05:00
4DBug f1c2c6ed06 ws-arch2: archive/zoo (types 1 / 2, stored / LZW / lzh, CRC-16; read) and codecs/compress/Lzw 'zoo' variant (13-bit codes)
codecs/compress/Lzw: decode accepts variant "zoo" (gif layout, 8-bit symbols, up to 13-bit codes; its tables grow
to 8192 entries); gif / tiff behaviour unchanged.
2026-10-31 14:49:54 -05:00
4DBug 70cc54f7c8 ws-arch2: archive/arj (methods 0-4 via codecs/compress/Lzh, CRC-32 checks; read) 2026-10-31 14:42:43 -05:00
4DBug 411261470a ws-arch2-unix: archive/lz4 (LZ4 frame read: linked / independent blocks, block / content XXH32, content size, skippable + legacy frames, concatenation; write: independent blocks) on codecs/compress/Lz4 (merged from ws/roblox ba4b20e) + codecs/compress/Xxh32; containers/Archive.streamData (shared single-stream payload: buffer / one entry / tar of entries; used by z and lz4); tests vs the lz4 tool both ways; bench lines
containers/Archive: additive helper streamData (requires containers/Tar); nothing existing changes.
2026-10-31 14:40:26 -05:00
4DBug 572cd42f8a ws-arch2: codecs/compress/Lzh (lh1 / lh4-lh7 / lhx / lzs / lz5 / ARJ 4; ported from lhasa, ISC) + archive/lha (levels 0-3, extended headers, symlinks, DOS-name case, read; level-2 lh0 write); bench lines 2026-10-31 14:40:25 -05:00
4DBug 197ddc561a ws-arch2-unix: containers/Iso9660 (volume descriptors, directory records, multi-extent, Joliet, Rock Ridge SUSP / RRIP incl. CE, NM, PX, PN, TF, SL, CL / RE relocation, El Torito catalog) + archive/iso, tests vs xorriso / genisoimage images, the source tree and pycdlib 2026-10-31 14:33:57 -05:00
4DBug 41c4fbfc6d ws-arch2: containers/Fat (FAT12 / 16 / 32, VFAT long names, MBR partitions, FAT12 floppy writer) + archive/fat (read + floppy write) 2026-10-31 14:25:20 -05:00
4DBug 6eadacce64 ws-arch2-unix: codecs/compress/UnixCompress (.Z LZW decode + encode, bit-identical to ncompress 5.0: group padding on width changes / CLEAR, ratio-check clears) + archive/z (single-stream, .taz / .tZ -> .tar, writes ncompress's bytes), tests vs ncompress and gzip -d, bench lines 2026-10-31 14:23:51 -05:00
4DBug b02e59809f ws-game: archive/mpq (MPQ v1-4 read: hash / block tables, encryption, listfile names, zlib / implode / bzip2 / LZMA / sparse sectors; Huffman / ADPCM UNSUPPORTED); codecs/compress/Explode (PKWARE DCL implode decompressor, binary + ASCII, tested against StormLib); licenses: blast (format reference) 2026-10-31 14:21:34 -05:00
4DBug f8a26fc699 ws-arch2: archive/adf (Amiga OFS / FFS, intl, dircache; DD / HD; read) 2026-10-31 14:20:36 -05:00
4DBug 5ca22c4431 ws-arch2: archive/d64 (C64 D64 / D71 / D81 read + write, PETSCII names as c1541) 2026-10-31 14:15:12 -05:00
4DBug 8b94584d0f ws-arch2-unix: archive/rpm (lead, signature + main headers, file list from dirnames / basenames, payload gzip / bzip2 / xz / lzma / zstd / none decompressed lazily via codecs/compress, cpio via containers/Cpio; meta.rpm), tests vs rpmbuild / rpm -qp / rpm2cpio; containers/Cpio.TYPE_OF 2026-10-31 14:14:56 -05:00
4DBug 3243291877 ws-arch2: archive/binhex, archive/macbinary (I / II / III), archive/applesingle (AppleSingle / AppleDouble v1 / v2), read + write, over the new containers/MacFile (fork convention, Mac OS Roman names, 1904 dates) 2026-10-31 14:11:03 -05:00
4DBug 34d0600109 ws-game: archive/vpk (Valve VPK v1 / v2 read incl. multi-part via opts.resolve / opts.files, preload, CRC checks; single-file v1 / v2 write with MD5 section) 2026-10-31 14:09:50 -05:00
4DBug 07f70f70d5 ws-arch2-unix: archive/ar (GNU / SysV long names + symbol tables, BSD #1/ names + __.SYMDEF; GNU / BSD writer) with .deb (meta.payload = data.tar.*, meta.control from control.tar.* via codecs/compress + containers/Tar), tests vs GNU ar (byte-identical), llvm-ar, bsdtar, dpkg-deb 2026-10-31 14:09:08 -05:00
4DBug 5ec3121f65 ws-game: archive/wad (IWAD / PWAD read + write; lumps with namespaces and maps; flats / pictures / composed textures as Images via PLAYPAL; maps as Scenes: triangulated sector floors / ceilings, walls with vanilla alignment, things); codecs/model/Polygon (2D polygons with holes -> triangles); licenses: Freedoom (fixture source only) 2026-10-31 14:05:53 -05:00
4DBug a05199c34d ws-arch2-unix: containers/Cpio (newc / crc / odc / old binary both endians read; newc / crc / odc write; hard links, symlinks, devices) + archive/cpio (any Archive -> cpio), tests vs GNU cpio (byte-identical re-encode) and bsdtar 2026-10-31 14:02:43 -05:00
4DBug fe44292f58 ws-arch2: archive/yenc (yEnc 1.3 read incl. multi-part in one text, write; CRC checks) 2026-10-31 14:00:46 -05:00
4DBug 8cdb65367a ws-arch2: archive/uu (uuencode / xxencode / base64 blocks, read + write), core/Crc16 (ccitt / arc), Archive.files helper, shared fixture helpers (_arch2.py / _arch2_ours.luau) and tests/archive/_entries.luau
core/Crc16 is new (CRC-16/XMODEM for BinHex / MacBinary, CRC-16/ARC for LHA / Zoo). containers/Archive gains
Archive.files(value, name?) (additive).
2026-10-31 13:58:54 -05:00
4DBug eac069f7dc ws-game: archive/grp (Build engine GRP read + write) 2026-10-31 13:56:30 -05:00
4DBug d41d64219a ws-game: archive/pak (Quake PACK / SiN SPAK read + write); containers/Archive: slice() lazy loader and collect() for simple archive writers (additive) 2026-10-31 13:52:17 -05:00
4DBug 51b08575c4 ws-cleanup: codecs/ grouped by domain; containers/Chunks, codecs/audio/Stream, codecs/image/Pixels, codecs/model/Mat4
C2, the hierarchy (tools/move.py, every reference rewritten mechanically):
- codecs/compress: Deflate Lzma Zstd Brotli Bzip2 Lzw; codecs/entropy: Huffman (from core) RangeCoder;
  codecs/image: Jpeg Dct Vp8 Vp8L Yuv Quantize Raster Blend Pixels; codecs/audio: Mdct Aac Alac Pcm Resample
  VorbisComment Tracker SoundFont Stream; codecs/video: H264 Mpeg1 Video; codecs/text: Json Xml Text Url;
  codecs/font: TrueType Cff; codecs/model: MeshFlatten Mat4. containers/ stays flat; core/ keeps Bytes Bits Err
  Crc32 Adler32 Base64 Md5 Input Sniff.
- LAYERS lint: codecs must sit in a domain folder; gen_registry lists codecs by domain (docs/FORMATS.md).
- Checked: build.py both targets, rojo build of build/roblox, the full suite on both runtimes.

C3, generic code out of format folders:
- containers/Chunks (new): the chunked-file walker (RIFF / RIFX / IFF / PNG / CAF layouts: endianness, size first,
  trailer, padding, lenient missing pad, open-ended ids, size hooks). containers/Riff walks with it (RF64 ds64
  through the resize hook); image/png, audio/aiff and audio/caf list their chunk handlers over it.
- codecs/audio/Stream (new): Stream.packets, the packet-decoder Decoder (read / seek with pre-roll / position,
  priming and end trimming) that aac, caf and m4a each carried (~70 lines each).
- codecs/image/Pixels: image/bmp/Pixels promoted (+ rgb555); image/ico's DIB decoder uses its row loops instead of
  its own (the AND mask / alpha rule stay ICO's).
- codecs/model/Mat4 (new): matrices / quaternions / TRS shared by FBX (Xform keeps only the FBX transform model),
  Collada (Math keeps only <lookat> / <skew>) and USD (its matrix helpers and general 4x4 inverse); Mat4.mul is
  Types.Scene.mul. The Collada normal matrix is now the inverse transpose (it was the inverse; same result for the
  fixtures' bind shapes).
- README rewritten (install for Rojo and LÖVE / LuaJIT, quick start per category, F.* and F.ops, host notes:
  FORMATS_NO_JIT_TUNE, paths, layout); docs/STYLE.md: the codec domains, "what belongs in a format folder" with the
  shared building blocks and the DUP rule, conventions (WAVE order, lower-case tags, loops, the api hooks
  decodeImage / encodeImage / openAudio / plugins / resolve, the codecs/video/Video registry), Err.from, the type
  baseline. New tests: tests/containers/chunks, tests/codecs/mat4. Type baseline 93.
2026-10-31 12:25:03 -05:00
4DBug b51f5be542 merge ws/absorb: bmp wav mp3 flac opus zip playlists (+APNG, writers), containers Ogg/Riff/Zip, codecs Url/Text 2026-10-31 09:00:09 -05:00
4DBug 6226ec41e4 ws-arch: archive/7z reads BZip2 (codecs/Bzip2) and Zstd (codecs/Zstd) coders; fixtures test BZip2 solid + BCJ 2026-10-31 08:55:24 -05:00
4DBug a9110bdab2 ws-arch: containers/Tar + archive/tar (ustar / pax / GNU read + write, byte-identical to Python's tarfile) and archive/gzip (read + write, .tar.gz writing); tests incl. .tar.gz/.tgz/.tar.bz2/.tar.xz/.tar.zst/.tar.br unwrap through the api 2026-10-31 08:54:37 -05:00
4DBug be534d9b1d absorb: containers/Zip (reader from zip-luau 121d4b0 with a direct codecs/Deflate require, Err values; new writer: store/deflate, UTF-8, DOS times, raw copies, ZIP64) + archive/zip (Types.Archive list/read/add/remove/write, create, encode); tests vs Python zipfile 2026-10-31 08:51:05 -05:00
4DBug f6ce1da736 ws-arch: merge ws/arch-lzma 2026-10-31 08:38:55 -05:00
4DBug 9fadc7155f ws-arch: merge ws/arch-zstd 2026-10-31 08:37:32 -05:00
4DBug 63a2e33387 ws-arch: merge ws/arch-brotli 2026-10-31 08:37:32 -05:00
4DBug 77b840166e ws-arch: archive/7z: 7z read (plain / encoded headers, solid folders, copy / LZMA / LZMA2 / Deflate with BCJ / ARM64 / delta filters, UTF-16 names, mtimes, attributes, CRCs; lazy per-folder decode); tests against 7-Zip 26 2026-10-31 08:37:15 -05:00
4DBug 45cc667083 ws-arch: codecs/Zstd (RFC 8878 decoder from the spec: frames, skippable frames, raw/RLE/compressed blocks, Huffman literals, FSE tables, repeat offsets, XXH64 checksum on 32-bit halves) + archive/zst (single-stream archive); tests against the zstd CLI on both runtimes 2026-10-31 08:36:24 -05:00
4DBug 0bfd70e1ca ws-arch: codecs/Brotli (RFC 7932 decoder: all meta-block kinds, context modes/maps, static dictionary + 121 transforms, large windows) and archive/br (single-stream archive); tools/brotli_static.py generates codecs/Brotli/Static from the brotli sources (MIT, licenses/brotli-LICENSE.txt); fixtures via python brotli + CLI 2026-10-31 08:36:16 -05:00
4DBug 0a56389b09 ws-arch: archive/xz: .xz / .lzma read as one-entry stream archives (codecs/Lzma) 2026-10-31 08:32:50 -05:00
4DBug b7018b6bfb ws-arch: codecs/Bzip2 (bzip2 decompressor: Huffman groups, MTF/RUNA/RUNB, inverse BWT, RLE1, block + stream CRCs, concatenated streams) + archive/bz2 (single-stream archive); tests vs Python bz2 (libbzip2) on both runtimes 2026-10-31 08:27:55 -05:00