Files
rosetta/docs/FORMATS.md
T

2.8 KiB

Formats

GENERATED by tools/gen_registry.py from each format's contract (caps) - do not edit. Every format listed here is tested under both runtimes (luau --codegen -O2 and LuaJIT through the build) by bash tools/test.sh.

Category Format Extensions Read Write Capabilities Test
image bmp .bmp .dib yes yes alpha: true, depths: 1, 2, 4, 8, 16, 24, 32, rle: true tests/image/bmp.luau
image png .png .apng yes yes animation: true, alpha: true, depths: 1, 2, 4, 8, 16 tests/image/png.luau
audio aac .aac .adts yes - codecs: "aac", streaming: true tests/audio/aac.luau
audio caf .caf .caff yes yes codecs: "pcm", "alac", "aac", "ulaw", "alaw", encodeCodecs: "pcm", "alac", tags: true, streaming: true tests/audio/caf.luau
audio flac .flac .oga yes - streaming: true, depths: 4, 8, 12, 16, 20, 24, 32, ogg: true, seek: true tests/audio/flac.luau
audio m4a .m4a .m4b .m4r .aac.mp4 yes yes codecs: "aac", "alac", encodeCodecs: "alac", tags: true, streaming: true tests/audio/m4a.luau
audio mp3 .mp3 .mp2 .mp1 .mpga yes - streaming: true, seek: true, layers: 1, 2, 3, channels: 2 tests/audio/mp3.luau
audio opus .opus yes - streaming: true, seek: true, lossy: true, channels: 255, rates: 48000 tests/audio/opus.luau
audio wav .wav .wave .rf64 .bw64 yes yes streaming: true, depths: 8, 16, 24, 32, float: true, rf64: true tests/audio/wav.luau
archive zip .zip .wsz yes yes methods: "store", "deflate", zip64: true tests/archive/zip.luau
playlist m3u .m3u .m3u8 yes yes hls: true tests/playlist/m3u.luau
playlist pls .pls yes yes tests/playlist/pls.luau
playlist xspf .xspf yes yes tests/playlist/xspf.luau

Codecs (layer 1, shared by formats; not loadable on their own):

  • codecs/Aac: AAC-LC decoder (ISO/IEC 14496-3 subpart 4, ISO/IEC 13818-7): the AudioSpecificConfig (with a program
  • codecs/Alac: Apple Lossless (ALAC) decoder and encoder, the codec inside m4a / mov / caf. A codec (layer 1).
  • codecs/Deflate: DEFLATE (RFC 1951) decoder and compressor, with the zlib (RFC 1950) and gzip (RFC 1952) wrappers.
  • codecs/Json: JSON (RFC 8259 / ECMA-404) parse and serialize, the engine data/json, glTF, TMJ, ... use. New code.
  • codecs/Mdct: the MDCT / IMDCT of any window length N divisible by 4 (N / 2 coefficients), through an N / 4-point
  • codecs/Text: text decoding helpers for the text formats: a UTF-8 BOM is stripped, text that is not valid UTF-8 is
  • codecs/Url: RFC 3986 reference resolution (section 5.2), the classification of a playlist / manifest location (URL,
  • codecs/Xml: XML 1.0 parse (DOM and pull events) and serialize, the engine data/xml, SVG, DAE, 3MF, TMX, plist, ...