arsd.archive

Provides LZMA (aka .xz) and .tar file read-only support. Combine to read .tar.xz files, or use in conjunction with other files to read other types of .tar files.

Also has a custom archive called arcz read and write support. It is designed to efficiently pack and randomly access large numbers of similar files. Unlike .zip files, it will do cross-file compression (meaning it can significantly shrink archives with several small but similar files), and unlike tar.gz files, it supports random access without decompressing the whole archive to get an individual file. It is designed for large numbers of small, similar files.

Public Imports

core.stdc.stdio
public import core.stdc.stdio : SEEK_SET, SEEK_CUR, SEEK_END;

Members

Aliases

ELzmaFinishMode
alias ELzmaFinishMode = int

Undocumented in source.

ELzmaStatus
alias ELzmaStatus = int

Undocumented in source.

Classes

ArzCreator
class ArzCreator

this class can be used to create archive file.

Enums

LZMA_FINISH_ANY
anonymousenum LZMA_FINISH_ANY

Undocumented in source.

LZMA_STATUS_NOT_SPECIFIED
anonymousenum LZMA_STATUS_NOT_SPECIFIED

Undocumented in source.

SRes
enum SRes

Undocumented in source.

TarFileType
enum TarFileType

There's other types but this is all I care about. You can still detect the char by ((cast(char) type) + '0')

Functions

LzmaDec_Allocate
SRes LzmaDec_Allocate(CLzmaDec* p, const(Byte)* props, uint propsSize)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDec_AllocateProbs
SRes LzmaDec_AllocateProbs(CLzmaDec* p, const(Byte)* props, uint propsSize)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDec_DecodeToBuf
SRes LzmaDec_DecodeToBuf(CLzmaDec* p, Byte* dest, SizeT* destLen, const(Byte)* src, SizeT* srcLen, ELzmaFinishMode finishMode, ELzmaStatus* status)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDec_DecodeToDic
SRes LzmaDec_DecodeToDic(CLzmaDec* p, SizeT dicLimit, const(Byte)* src, SizeT* srcLen, ELzmaFinishMode finishMode, ELzmaStatus* status)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDec_Free
void LzmaDec_Free(CLzmaDec* p)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDec_FreeProbs
void LzmaDec_FreeProbs(CLzmaDec* p)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDec_Init
void LzmaDec_Init(CLzmaDec* p)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaDecode
SRes LzmaDecode(Byte* dest, SizeT* destLen, const(Byte)* src, SizeT* srcLen, const(Byte)* propData, uint propSize, ELzmaFinishMode finishMode, ELzmaStatus* status)

Undocumented in source. Be warned that the author may not have intended to support it.

LzmaProps_Decode
SRes LzmaProps_Decode(CLzmaProps* p, const(Byte)* data, uint size)

Undocumented in source. Be warned that the author may not have intended to support it.

processTar
bool processTar(TarFileHeader* header, long* bytesRemainingOnCurrentFile, ubyte[] dataBuffer, void delegate(TarFileHeader* header, bool isNewFile, bool fileFinished, ubyte[] data) handleData)

Low level tar file processor. You must pass it a TarFileHeader buffer as well as a size_t for context. Both must be initialized to all zeroes on first call, then not modified in between calls.

readVla
ulong readVla(ubyte[] data)

Undocumented in source. Be warned that the author may not have intended to support it.

upToZero
inout(char)[] upToZero(inout(char)[] a)

Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

LZMA_PROPS_SIZE
enum LZMA_PROPS_SIZE;

Undocumented in source.

arcz_has_balz
enum arcz_has_balz;

ARZ chunked archive format processor.

arcz_has_balz
enum arcz_has_balz;

Undocumented in source.

arcz_has_zopfli
enum arcz_has_zopfli;

Undocumented in source.

arcz_has_zopfli
enum arcz_has_zopfli;

Undocumented in source.

Structs

AZFile
struct AZFile

Opened file.

ArzArchive
struct ArzArchive

ARZ archive accessor. Use this to open ARZ archives, and open packed files from ARZ archives.

CLzmaDec
struct CLzmaDec

Undocumented in source.

CLzmaProps
struct CLzmaProps

Undocumented in source.

TarFileHeader
struct TarFileHeader

A header of a file in the archive. This represents the binary format of the header block.

XzDecoder
struct XzDecoder

A simple .xz file decoder.

Meta