archive.targz

Type that implements the TarGz Filter used with the Archive template.

Members

Aliases

TarGzArchive
alias TarGzArchive = Archive!(TarPolicy, GzFilter!6)

Convenience alias that simplifies the interface for users

Classes

GzFilter
class GzFilter(int L)

Filter class which can be used by the Archive class to compress/decompress files into a .gz format.

Meta

Source

See Source File
http://github.com/rcythr/archive

Filter class which can be used by the Archive class to compress/decompress files into a .gz format.

The only current available alias which uses this filter is the TarGzArchive.

Reading Usage:

import archive.targz;
import std.stdio;

auto archive = new TarGzArchive(std.file.read("my.tar.gz");

foreach(file; archive.files)
{
    writeln("Filename: ", file.path);
    writeln("Data: ", file.data);
}

Writing Usage:

import archive.targz;

auto archive = new TarGzArchive();

auto file = new TarGzArchive.File("languages/awesome.txt");
file.data = "D\n"; // can also set to immutable(ubyte)[]
archive.addFile(file);

std.file.write("lang.tar.gz", cast(ubyte[])archive.serialize());

Authors

Richard W Laughlin Jr.