ACE Archive (.ace)

Archive format from the late 1990s.

Overview

ACE archives start with a main header (magic **ACE** at offset 7) followed by file headers with CRC-32. Compression uses LZ77, blocked and stored modes, with optional solid mode and multi-volume sets.

Where it is used

  • Software and media distribution around 1998-2005.

History

  • Created by Marcel Lemke (e-merge GmbH) in 1998.

Status today

  • Legacy; a path-traversal flaw in the old UNACEV2 library led many tools to drop support in 2019.

Structures read by the implementation

Offsets are in bytes from the start of the buffer named in each heading. Field names are taken from the implementation and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

AceArchiveModule.Mount buffer h.Body · AceArchiveModule.cs

OffsetSizeTypeFieldNotes
0x38u64 LE–
0x34u32 LE–

FileHeader.ParseFile buffer b · AceArchiveModule.cs

OffsetSizeTypeFieldNotes
i8u64 LEPacked
i4u32 LEPacked
i4u32 LEOdified
i + 44u32 LESize
i + 44u32 LEAttributes
i + 88u64 LESize
i + 121u8Ethod
i + 182u16 LEName Length

FileHeader.ReadHeader buffer body · AceArchiveModule.cs

OffsetSizeTypeFieldNotes
0x01u8–
0x12u16 LE–

FileHeader.ReadHeader buffer head · AceArchiveModule.cs

OffsetSizeTypeFieldNotes
0x02u16 LE–
0x22u16 LESize

FileHeader.Carve buffer h.Body · AceCarver.cs

OffsetSizeTypeFieldNotes
0x38u64 LEAdd Size
0x34u32 LEAdd Size

FileHeader.Carve buffer m · AceCarver.cs

OffsetSizeTypeFieldNotes
0xB1u8Creator Version
0xC1u8Host Os
0xD1u8Volume
0xE4u32 LEArchive Date
at2u16 LEComment Length

FileHeader.ParseFile buffer b · AceCarver.cs

OffsetSizeTypeFieldNotes
i8u64 LEPacked
i4u32 LEPacked
i4u32 LEOdified
i + 44u32 LESize
i + 44u32 LEAttributes
i + 88u64 LESize
i + 84u32 LECrc
i + 121u8Ethod
i + 131u8Quality
i + 182u16 LEName Length

struct.LooksLikeDamagedHeader buffer head · AceCarver.cs

OffsetSizeTypeFieldNotes
0x22u16 LESize
0x41u8–
0x52u16 LEFlags

struct.ReadHeader buffer body · AceCarver.cs

OffsetSizeTypeFieldNotes
0x01u8–
0x12u16 LE–

struct.ReadHeader buffer head · AceCarver.cs

OffsetSizeTypeFieldNotes
0x02u16 LE–
0x22u16 LESize

ChunkEnd.TranslateExe buffer buffer · AceDecoder.cs

OffsetSizeTypeFieldNotes
i + 14u32 LERel32
i + 12u16 LERel16

Constants

General AceCarver

NameValueTypeNotes
TypeMain0, TypeFile32 = 1, TypeRecovery32 = 2, TypeFile64 = 3, TypeRecovery64A = 4, TypeRecover…int
FlagAddSize0x0001, FlagComment = 0x0002, Flag64Bit = 0x0004int
MainFlagSfx0x0200, MainFlagMultiVolume = 0x0800, MainFlagAdvert = 0x1000, MainFlagRecovery = 0x200…int
FileFlagNtSecurity0x0400, FileFlagContinuedFromPrevious = 0x1000, FileFlagContinuesInNext = 0x2000, FileF…int
FlagSolid0x8000int
AttributeDirectory0x10int

General struct

NameValueTypeNotes
Lz770, Lz77Delta = 1, Lz77Exe = 2, Sound8 = 3, Sound16 = 4, Sound32A = 5, Sound32B = 6, Pic…int

General AceHuffman

NameValueTypeNotes
WidthWidthBits3int

General AceLz77

NameValueTypeNotes
TypeCode260 + MaxDictionaryBits + 1int
NumMainCodes260 + MaxDictionaryBits + 2int
NumLengthCodes256 – 1int
DictionarySize1 << MaxDictionaryBitsint
DictionaryMaskDictionarySize – 1int

General AceSound

NameValueTypeNotes
RunLengthCodes32int
TypeCode256 + RunLengthCodesint
NumCodes256 + RunLengthCodes + 1int
ChannelCounts[1, 2, 3, 3]int[]
UseChannels[[0, 0, 0, 0], [0, 1, 0, 1], [0, 1, 0, 2], [1, 0, 2, 0]]int[][]
QuantizerBuildQuantizer()int[]

General AcePicture

NameValueTypeNotes
Contexts365int
DifBitWidthBuildDifBitWidth()int[]
QuantizerBuildQuantizer(1)int[]
Quantizer9BuildQuantizer(9)int[]
Quantizer81BuildQuantizer(81)int[]

General AceDecoder

NameValueTypeNotes
Piece64 * 1024int

General AceArchiveModule

NameValueTypeNotes
TypeMain0, TypeFile32 = 1, TypeFile64 = 3int
FlagAddSize0x0001, FlagComment = 0x0002, Flag64Bit = 0x0004int
FileFlagContinuedFromPrevious0x1000, FileFlagContinuesInNext = 0x2000, FileFlagPassword = 0x4000int
FlagSolid0x8000int
AttributeDirectory0x10int

Implementation limits reader

ClassNameValueNotes
AceCarverMaxEntries100_000
AceCarverMaxCheckedOutput1L << 30
AceBitsMaxOverrunWords2
AceHuffmanMaxWidthWidth(1 << WidthWidthBits) – 1
AceLz77MaxCodeWidth11
AceLz77MaxDictionaryBits22
AceLz77MaxDistanceAtLength2255
AceLz77MaxDistanceAtLength38191
AceSoundMaxCodeWidth10
AceArchiveModuleMaxEntries100_000
AceArchiveModuleMaxSolidOutput2L << 30eager in-memory decode budget for a solid archive

ChunkEnd enum

NameValue
Piece(next)
ModeSwitch(next)
FileEnd(next)

Signatures and magic strings referenced

TextWhereContext
**ACE**struct.IsMainHeader&& h.Body.AsSpan(3, 7).SequenceEqual(“**ACE**”u8);
**ACE**AceArchiveModulenew Signature(7, “**ACE**”u8.ToArray(), Confidence.High, “ACE”),
**ACE**FileHeader.IsMainHeader&& h.Body.AsSpan(3, 7).SequenceEqual(“**ACE**”u8);
Structures and constants were extracted from: Carving/Plugins/Ace/AceCarver.cs, Carving/Plugins/Ace/AceDecoder.cs, Modules/FileSystems/AceArchiveModule.cs. Prose sections are a summary from public sources; verify details before relying on them.