Commit Graph
6 Commits
Author SHA1 Message Date
4DBugandClaude Opus 5.5 8158acf3d5 ws-cleanup: shared helpers instead of copies (CRCs, codec arguments, utf8char, keyLess / isArray)
A sweep for duplicated function bodies, CRC tables and base64 across src/Formats:
- core/Crc32.msb / MSB_TABLE: the MSB-first 0x04C11DB7 CRC-32 that containers/Ogg (Page + Mux), containers/MpegTs
  and codecs/Bzip2 each built (test vectors CRC-32/MPEG-2 and /BZIP2 in tests/core/bytes).
- audio/flac/Encode uses audio/flac/Frame's CRC-8 / CRC-16 tables (Frame.crc8 added) instead of its own copy.
- core/Bytes.toBuffer / Bytes.span: the (buffer | string, offset, length) argument checking codecs/Deflate,
  codecs/Lzma and codecs/Brotli each carried.
- codecs/Text.utf8char: one copy instead of four (codecs/Json, codecs/Xml, data/yaml, data/toml).
- Types.keyLess / Types.isArray (small additions to Types, backward compatible): data/msgpack, data/cbor and
  data/yaml/Emit had identical copies.
- playlist/pls: dead copies of m3u's attributes / extinf removed.
Left on purpose: per-codec bit readers / writers in hot loops (STYLE.md: inner loops keep their own bit buffers),
same-folder helpers (Alac signExtend, Vorbis ilog), Zip's DOS-date civil() (a different epoch helper).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 10:58:31 -05:00
4DBugandClaude Opus 5.5 a25b7c0caa ws-cleanup: one base64 (core/Base64)
core/Base64 takes over codecs/Base64's API (encode(buf | string, { url, pad, wrap }, offset, length), decode of both
alphabets, decodeDataUri, dataUri) plus line wrapping (opts.wrap) for plist; codecs/Base64 is removed and glTF /
DAE require core/Base64. The private copies in data/plist (Base64.luau), data/yaml (Parse / Emit) and codecs/Brotli
(the static tables) are gone. tests/codecs/base64 merged into tests/core/base64.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 10:50:40 -05:00
4DBug 43b8f4b4f5 ws-audio: merge master (ws/m4a codecs/Mdct already in use since 6535a3c; audio/opus encoder, data, vec, 3d, webp) 2026-10-31 09:29:36 -05:00
4DBug 471b7636ef ws-audio: FLAC encoder (audio/flac/Encode: levels 0-8 like libFLAC presets, fixed + LPC + Rice/Rice2 partition search, wasted bits, stereo decorrelation, MD5, VORBIS_COMMENT, SEEKTABLE, padding; streams from a Decoder) wired into audio/flac encode; core/Md5 (new core module, RFC 1321) + test; fixtures: flac -t + MD5 bit-exact on 76 encodes, sizes within 1.1% of libFLAC; bench lines 2026-10-31 09:04:31 -05:00
4DBug 738bf0e078 vec: vector/tiled (TMX + TMJ + TSX/TSJ read/write into TileMap: all data encodings, chunks, objects, typed properties, tilesets as references); core/Base64 (new, small); Types: TileMap.new + open TileMap/Tileset/TileLayer fields; api: F.save passes the destination extension as opts.format when none is given (tmx vs tmj). Tests vs Tiled exports and Tiled reading our files 2026-10-31 08:54:35 -05:00
4DBugandClaude Opus 5.5 ccb06775c5 formats-luau foundation: build (darklua + token passes) for Roblox and LuaJIT, compat prelude, core, Types, host adapters, API + registry, lint, tests on both runtimes; absorb deflate (codecs/Deflate + new compressor) and png (image/png + new encoder)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-31 08:18:01 -05:00