Files
rosetta/docs/FORMATS.md
T

3.9 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 png .png .apng yes yes animation: false, alpha: true, depths: 1, 2, 4, 8, 16 tests/image/png.luau
font bmfont .fnt yes yes bitmap: true, variants: "text", "xml", "binary" tests/font/bmfont.luau
font ttf .ttf .otf .ttc .otc yes - outlines: "truetype", "cff", collection: true, kerning: true tests/font/ttf.luau
font woff .woff yes - outlines: "truetype", "cff" tests/font/woff.luau
font woff2 .woff2 yes - outlines: "truetype", "cff", transforms: "glyf", "loca", "hmtx" tests/font/woff2.luau
archive 7z .7z yes - methods: "copy", "lzma", "lzma2", "deflate", "bcj", "delta", encrypted: false tests/archive/7z.luau
archive br .br yes - stream: true tests/archive/br.luau
archive bz2 .bz2 .tbz2 .tbz yes - stream: true tests/archive/bz2.luau
archive gzip .gz .tgz .gzip yes yes stream: true tests/archive/gzip.luau
archive tar .tar yes yes variants: "ustar", "pax", "gnu" tests/archive/tar.luau
archive xz .xz .txz .lzma yes - stream: true, filters: "lzma2", "lzma", "delta", "x86", "powerpc", "arm", "armthumb", "sparc", "arm64" tests/archive/xz.luau
archive zst .zst .tzst yes - stream: true tests/archive/zst.luau
data json .json .jsonl .ndjson .geojson yes yes ordered: true, streaming: true tests/data/json.luau
data xml .xml .xsd .xsl .xslt .rss .atom .xhtml yes yes namespaces: true, streaming: true tests/data/xml.luau
vector svg .svg yes yes rasterize: true, text: false tests/vector/svg.luau
vector tiled .tmx .tmj .tsx .tsj yes yes tilesets: true, infinite: true tests/vector/tiled.luau
layered aseprite .aseprite .ase yes yes layers: true, groups: true, animation: true, depths: 8, 16, 32 tests/layered/aseprite.luau
layered psd .psd .psb yes yes layers: true, groups: true, depths: 1, 8, 16, 32 tests/layered/psd.luau
subtitle ass .ass .ssa yes yes styles: true tests/subtitle/ass.luau
subtitle srt .srt yes yes styles: false tests/subtitle/srt.luau
subtitle vtt .vtt .webvtt yes yes styles: true tests/subtitle/vtt.luau

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

  • codecs/Blend: layer compositing on rgba8 buffers (straight alpha): source-over with the separable and non-separable
  • codecs/Brotli: Brotli (RFC 7932) decompression. A codec (layer 3): archive/br and font/woff2 build on it. Written
  • codecs/Bzip2: bzip2 decompressor (BWT + MTF + Huffman, the .bz2 stream format of bzip2 0.9.5 / 1.0.x). A codec
  • codecs/Cff: Compact Font Format (Adobe TN #5176) and Type 2 charstrings (TN #5177): the outlines of OpenType fonts
  • 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/Lzma: LZMA and LZMA2 decoders, the .lzma ("LZMA alone") wrapper and the .xz container. A codec (layer 3):
  • codecs/Raster: an antialiased scanline rasterizer for paths of lines, quadratic and cubic Béziers, under an affine
  • codecs/TrueType: the sfnt font container (TrueType .ttf, OpenType .otf with CFF outlines, collections .ttc) parsed
  • codecs/Xml: XML 1.0 parse (DOM and pull events) and serialize, the engine data/xml, SVG, DAE, 3MF, TMX, plist, ...
  • codecs/Zstd: Zstandard decompression (RFC 8878). A codec (layer 3): archive/zst and anything else carrying zstd