gmipf 1663345195 Add a UDF reader and wrapper (#100)
* Add a UDF reader

Reads the Volume Recognition Sequence, the Anchor Volume Descriptor
Pointer (sector 256, then the end of the volume), the Main or Reserve
Volume Descriptor Sequence, the File Set Descriptor and the directory
hierarchy. Type 1 and Metadata Partitions are mapped, Virtual and
Sparable partitions are not.

File Entries, Allocation Extent Descriptors and directories are read in
ascending sector order with wrap-around, adjacent sectors merged into
one request. FindFileEntry follows one path and reads only the
directories on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a UDF wrapper

Prints the volume and file set structures and the directory hierarchy,
and extracts the files. CreateDiscImageWrapper tries UDF after ISO 9660
for a stream at offset 0, so discs with both file systems still open as
ISO 9660.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Treat the stream position as the start of the UDF volume

The UDF reader addresses logical sectors from the start of the stream,
so the wrapper hands it a view that starts at the current position and
keeps that offset, like the other wrappers. CreateDiscImageWrapper no
longer skips UDF for a stream that is not at offset 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Address review comments on the UDF code

- Move the descriptor tag check to UDFExtensions, with tests
- Parse Volume Structure Descriptors in their own method
- Use the existing extensions for numbers, the partition type identifier
  and printing entity identifiers
- Use Array.Exists in IsSafeName
- Make Extract non-virtual and remove the printing test
- Use collection expressions and string interpolation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Parse File Identifier Descriptors in their own method

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Add a TODO to use the CRC from Hashing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:18:23 +01:00
2026-11-11 12:02:16 +01:00
2026-11-11 12:02:16 +01:00
2026-11-11 12:02:16 +01:00
2026-11-11 12:02:16 +01:00
2026-03-21 16:26:56 -04:00
2026-01-25 16:15:05 -05:00
2026-04-22 09:35:17 -04:00
2026-11-11 12:02:16 +01:00
2026-11-11 12:02:16 +01:00
2026-05-21 10:38:38 -04:00

SabreTools.Serialization

Build and Test

This meta-library comprises of serializers that both read and write from files and streams to the dedicated models as well as convert to and from the common internal models. This library is partially used by the current parsing and writing code but none of the internal model serialization is used.

Find the link to the Nuget package here.

Releases

For the most recent stable build, download the latest release here: Releases Page

For the latest WIP build here: Rolling Release

InfoPrint

InfoPrint is a reference implementation for the deserialization and printing features of the library, packaged as a standalone executable for all supported platforms. It will attempt to detect and display information about many supported file types, optionally both hashing the file and outputting the information to a JSON file.

InfoPrint <options> file|directory ...

Options:
-?, -h, --help           Display this help text
-d, --debug              Enable debug mode
-c, --hash               Output file hashes
-f, --file               Print to file only
-j, --json               Print info as JSON
-r, --recursive          Recursively print info from embedded files

ExtractionTool

ExtractionTool is a reference implementation for the extraction features of the library, packaged as a standalone executable for all supported platforms. It will attempt to detect and extract many supported file types. See the table below for supported extraction functionality.

ExtractionTool <options> file|directory ...

Options:
-?, -h, --help           Display this help text
-d, --debug              Enable debug mode
-o, --outdir [PATH]      Set output path for extraction (required)
Format Name Notes
7-zip archive .NET Framework 4.6.2 and greater
Atari 7800 (A78) Cart Image Header and ROM data
Atari Lynx (LNX) Cart Image Header and ROM data
BFPK custom archive format
bzip2 archive .NET Framework 4.6.2 and greater
Compound File Binary (CFB) Only CFB common pieces extractable
fwNES FDS file Header and disk data
gzip archive
Half-Life Game Cache File (GCF)
Half-Life Level (BSP)
Half-Life Package File (PAK)
Half-Life Texture Package File (WAD3)
Half-Life 2 Level (VBSP)
InstallShield Archive V3 (Z)
InstallShield CAB
ISO9660 ISO and BIN files
Microsoft cabinet file Does not support LZX or Quantum compression
Microsoft LZ-compressed files KWAJ, QBasic, and SZDD variants
MoPaQ game data archive (MPQ) Windows only
New Exectuable Embedded archives and executables in the overlay and Wise installer
Nintendo Entertainment System (NES) Cart Image Header, Trainer data, PRG-ROM, CHR-ROM, Unheadered ROM, and PlayChoice-10 INST-ROM
NovaLogic Game Archive Format (PFF)
PKZIP and derived files (ZIP, etc.) .NET Framework 4.6.2 and greater
Portable Executable Embedded archives and executables in the resources and overlay, CExe-packed data, SFX archives (7-zip, PKZIP, and RAR), and Wise installer
Quantum archive (Q) Currently not working
RAR archive (RAR) .NET Framework 4.6.2 and greater
SGA game archive
Tape archive (TAR)
Valve Package File (VPK)
XBox Package File (XZP)
Xbox DVD Filesystem (XISO)
xz archive (XZ) .NET Framework 4.6.2 and greater
ZArchive

Namespaces

Below are a list of the included namespaces with links to their README files:

Description
No description provided
Readme 107 MiB
Latest
2025-11-25 12:45:09 +00:00
Languages
C# 99.8%