archive.targz

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

Members

Aliases

TarGzArchive
alias TarGzArchive = Archive!(TarPolicy, GzFilter)

Convenience alias that simplifies the interface for users

Classes

GzFilter
class GzFilter

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:

1 import archive.targz;
2 import std.stdio;
3 
4 auto archive = new TarGzArchive(std.file.read("my.tar.gz");
5 
6 foreach(file; archive.files)
7 {
8     writeln("Filename: ", file.path);
9     writeln("Data: ", file.data);
10 }

Writing Usage:

1 import archive.targz;
2 
3 auto archive = new TarGzArchive();
4 
5 auto file = new TarGzArchive.File("languages/awesome.txt");
6 file.data = "D\n"; // can also set to immutable(ubyte)[]
7 archive.addFile(file);
8 
9 std.file.write("lang.tar.gz", cast(ubyte[])archive.serialize());

Authors

Richard W Laughlin Jr.