archive_io library

Classes

AbstractFileHandle
Base class for FileHandle and RamFileHandle. Provides an interface for random access to the data of a file.
Adler32
A class to compute Adler-32 checksums.
AesDecrypt
Archive
/ A collection of files
ArchiveFile
A file contained in an Archive.
Bz2BitReader
Internal class used by BZip2Decoder
Bz2BitWriter
Internal class used by BZip2Encoder
BZip2
Internal class used by BZip2Decoder
BZip2Decoder
Decompress bzip2 compressed data. Derived from libbzip2 (http://www.bzip.org).
BZip2Encoder
Compress data using the BZip2 format. Derived from libbzip2 (http://www.bzip.org).
Crc32
A class to compute Crc-32 checksums.
Deflate
Dart implementation of the ZLib deflate compression algorithm, used by ZLibEncoder and GZipEncoder.
DeflateLevel
Defines some standard compression levels to use for the Deflate algorithm.
FileBuffer
Buffered file reader reduces file system disk access by reading in buffers of the file so that individual file reads can be read from the cached buffer.
FileContent
Used by ArchiveFile to abstract the content of a file within an archive file, either in memory, or a position within a file on disk.
FileContentMemory
A FileContent that is resident in memory.
FileContentStream
A FileContent that is stored in a disk file.
FileHandle
GZipDecoder
Decompress data with the gzip format decoder. The actual decoder used will depend on the platform the code is run on. In a 'dart:io' based platform, like Flutter, the native GZipCodec will be used to improve performance. On web platforms, a Dart implementation of ZLib will be used, via the Inflate class. If you want to force the use of the Dart implementation, you can use the GZipDecoderWeb class.
GZipDecoderWeb
GZipEncoder
Compress data with the GZip format encoder. The actual encoder used will depend on the platform the code is run on. In a 'dart:io' based platform, like Flutter, the native GZipCodec will be used to improve performance. On web platforms, a Dart implementation of ZLib will be used, via the Deflate class. If you want to force the use of the Dart implementation, you can use the GZipEncoderWeb class.
GZipEncoderWeb
Inflate
Dart implementation of the ZLib inflate decompression algorithm, used by ZLibEncoder and GZipEncoder. This is used to decompress data that was previously compressed by the Deflate algorithm.
InputFileStream
Stream in data from a file.
InputMemoryStream
Stream in data from a memory buffer.
InputStream
LzmaDecoder
LZMA compression decoder, used by XZDecoder
OutputFileStream
OutputMemoryStream
OutputStream
RamFileData
RamFileHandle
RangeDecoder
Implements the LZMA range decoder for LZMADecoder.
RangeDecoderTable
Probability table used with RangeDecoder.
TarDecoder
Decode a tar formatted buffer into an Archive object.
TarEncoder
Encode an Archive object into a tar formatted buffer.
TarFile
A file entry decoded by TarDecoder.
TarFileEncoder
XZDecoder
Decompress data with the xz format decoder.
XZEncoder
Compress data using the xz format encoder. This encoder only currently supports uncompressed data.
ZipAesHeader
Internal class used by ZipDecoder.
ZipDecoder
Decode a zip formatted buffer into an Archive object.
ZipDirectory
The internal directory structure for a zip archive, used by ZipDecoder.
ZipEncoder
Encode an Archive object into a Zip formatted buffer.
ZipFile
A file object used by ZipDecoder.
ZipFileEncoder
ZipFileHeader
Provides information about a file, used by ZipDecoder.
ZLibDecoder
Decompress data with the zlib format decoder. The actual decoder used will depend on the platform the code is run on. In a 'dart:io' based platform, like Flutter, the native ZLibCodec will be used to improve performance. On web platforms, a Dart implementation of ZLib will be used, via the Inflate class. If you want to force the use of the Dart implementation, you can use the ZLibDecoderWeb class.
ZLibDecoderWeb
ZLibEncoder
Compress data with the zlib format encoder. The actual encoder used will depend on the platform the code is run on. In a 'dart:io' based platform, like Flutter, the native ZLibCodec will be used to improve performance. On web platforms, a Dart implementation of ZLib will be used, via the Deflate class. If you want to force the use of the Dart implementation, you can use the ZLibEncoderWeb class.
ZLibEncoderWeb

Enums

ByteOrder
CompressionType
The format of the compression an ArchiveFile is stored with.
EncryptionType
The type of encryption used to encrypt archive file contents.
FileAccess
XZCheck
Checksum used for compressed data.
ZipEncryptionMode
ZipFileOperation

Properties

paxRecordRegexp RegExp
final
platformZLibDecoder → ZLibDecoderBase
no setter

Functions

createArchiveFromDirectory(Directory dir, {bool includeDirName = true}) Archive
createTarFile(String dirPath) Future<void>
extractArchiveToDisk(Archive archive, String outputPath, {int? bufferSize}) Future<void>
extractArchiveToDiskSync(Archive archive, String outputPath, {int? bufferSize}) → void
extractFileToDisk(String inputPath, String outputPath, {String? password, int? bufferSize, ArchiveCallback? callback}) Future<void>
extractTarFiles(String inputPath, String outputPath) Directory
Extract the entries in the given tar file to a directory.
getAdler32(List<int> array, [int adler = 1]) int
Get the Adler-32 checksum for the given array. You can append bytes to an already computed adler checksum by specifying the previous adler value.
getAdler32Stream(InputStream stream, [int adler = 1]) int
getCrc32(List<int> array, [int crc = 0]) int
Get the CRC-32 checksum of the given array. You can append bytes to an already computed crc by specifying the previous crc value.
getCrc32Byte(int crc, int b) int
Get the CRC-32 checksum of the given int.
getCrc64(List<int> array, [int crc = 0]) int
inflateBuffer(List<int> data) FutureOr<Uint8List>?
isCrc64Supported() bool
listTarFiles(String path) → void
Print the entries in the given tar file.

Typedefs

ArchiveCallback = void Function(ArchiveFile entry)
A callback function called when archive entries are read from or written to archive files like zip or tar.
ZipFileProgress = ZipFileOperation Function(FileSystemEntity entity, double progress)

Exceptions / Errors

ArchiveException
An exception thrown when there was a problem in the archive library.