merge ws/arch2-cab (archive/cab; codecs/compress/Lzx, Quantum; Deflate preset dictionary + mszip)
This commit is contained in:
commit
3e83879a6e
15 files changed
+2267
-5
No files matched your search
@@ -329,6 +329,23 @@ local fat = assert(F.archive.load(floppyBytes))
|
||||
assert(fat.meta.fat == 12 and fat.meta.label == "DOCS" and fat:read("src/main.c"))
|
||||
local floppy = assert(F.save(adf, nil, { format = "fat", size = 720 })) -- copy the ADF's files to a FAT floppy
|
||||
assert(F.archive.load(floppy):read("s/readme"))
|
||||
## Microsoft Cabinet
|
||||
|
||||
Cabinet files (`.cab`) read with stored, MSZIP, LZX and Quantum folders; each data block's checksum is checked when
|
||||
a file of its folder is read. Entries carry the MS-DOS `attributes` (`readonly`, `executable`), `utf8` (the name flag)
|
||||
and `folder`; DOS times are local times without a zone, read as UTC. Files continued from or into another cabinet of
|
||||
a set read as `UNSUPPORTED`. Writing makes one folder, MSZIP (default, `level`) or stored (`compression = "none"`):
|
||||
|
||||
```luau
|
||||
local cab = assert(F.archive.load(cabBytes))
|
||||
assert(cab.format == "cab" and cab.meta.folders[1].method == "mszip")
|
||||
local by = {}
|
||||
for _, e in cab:list() do
|
||||
by[e.name] = e
|
||||
end
|
||||
assert(by["bin/tool.dll"].size == 16384 and by["readme.txt"].mtime == 1767225600)
|
||||
local out = assert(F.save(cab, nil, { format = "cab", compression = "none" }))
|
||||
assert(F.archive.load(out):list()[1].method == "store")
|
||||
```
|
||||
|
||||
## Formats
|
||||
@@ -360,6 +377,7 @@ assert(F.archive.load(floppy):read("s/readme"))
|
||||
| C64 disks (`.d64`, `.d71`, `.d81`) | yes | yes | PETSCII names; no GEOS VLIR |
|
||||
| Amiga disks (`.adf`) | yes | - | OFS / FFS; no long-name (DOS\\6 / 7) volumes |
|
||||
| FAT images (`.img`, `.ima`) | yes | yes | FAT12 / 16 / 32, VFAT names, MBR partitions; writes FAT12 floppies |
|
||||
| Cabinet (`.cab`) | yes | yes | stored / MSZIP / LZX / Quantum (read), stored / MSZIP (write); no spanned files |
|
||||
|
||||
Full capability list: [FORMATS.md](../FORMATS.md).
|
||||
|
||||
|
||||
Reference in new issue
Block a user