NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #4 most downloaded on pub.dev
Provides encoders and decoders for various archive and compression formats such as zip, tar, bzip2, gzip, zlib, xz, and zstd.
Latest stable
4.7.1
Last release 9 days ago
13 Nov 2026
Release timing varies
gaps range from 2 weeks to 10 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
107 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Fixed 4.7.0 failing to compile with dart2js when --no-deprecated-js-interop is passed, as in flutter build web --no-deprecated-js-interop, with or wit…
--no-deprecated-js-interop is passed, as in
flutter build web --no-deprecated-js-interop, with or without --wasm (#442, #443).Fixed extractFileToDisk, extractArchiveToDisk and extractArchiveToDiskSync writing nothing, without an error, when the output path is spelled differen
extractFileToDisk, extractArchiveToDisk and extractArchiveToDiskSync writing nothing, without an error,
when the output path is spelled differently from its real path: a Windows 8.3 short name, such as RUNNER~1 in
%TEMP% on GitHub runners, or a different letter case on a case-insensitive file system. Every entry was taken for
one outside the output directory (#439).extractFileToDisk no longer calls callback for a zip or tar entry that is not written, such as one whose path
points outside the output directory, or a zip link that cannot be read, so a caller counting the calls may see fewer
than the entries.InputFileStream.readUint16, readUint24, readUint32 and readUint64 reading past the end of a subset
into the bytes after it, and moving the position past the end, when fewer bytes were left than the value needs.
They return 0 and stop at the end, as at the end of the file. This affected truncated zip and tar headers.FileBuffer.readBytes returning bytes of an earlier read for a range that runs past the end of the file. It
returns only the bytes the file has. It and the 8 to 64-bit reads of FileBuffer also did this when the file is
shorter than its handle's length, for instance a file truncated while open.LzmaDecoder.decodeUncompressed leaving zeroes in the dictionary for the missing bytes of a stored chunk that
is cut short, which a later chunk could copy. It throws ArchiveException for a short or negative length and
leaves the decoder as it was. XZDecoder still returns the bytes before the cut of such a chunk.ZipDecoder finding no entries in a zip whose comment holds the end of central directory signature. A
candidate whose comment length reaches the end of the file is preferred.ZipDecoder searches for the end of central directory in 64 KB pieces once past the longest comment: a 256 MB file
that is not a zip is rejected in 0.3 s, not 9.8 s. A zip followed by any amount of other data is still found (#441).TarFileEncoder.tarDirectory compresses .tar.gz and .tar.zst as the tar is written, instead of writing a whole
uncompressed tar to the system temp directory first. A .tar.zst frame no longer records its content size, which
is not known while streaming. A failed .tar.gz or .tar.zst is deleted rather than left partly written.TarFileEncoder adding the archive it is writing to itself when the output is inside the directory being
added, also through a linked directory or a hard link. addFile closes the input file when reading its
metadata fails, and close closes the output when finishing the tar fails.TarFileEncoder.addDirectory without a filter adds entries as the directory is listed, instead of listing the
whole tree first.ZipFileEncoder.zipDirectory deletes the zip when adding an entry fails, as TarFileEncoder.tarDirectory does. When
filter or onProgress throws, the zip of the entries added before it is kept, as with ZipFileOperation.cancel.
addDirectory without callbacks adds entries as the directory is listed, instead of listing the whole tree first.ZipFileEncoder.addFileSync leaving its input file open, and addFile leaving it open when the entry fails.
close and closeSync close the output when finishing the zip fails.ZipEncoder.encodeBytes with
deflate is about 2.5 times faster, TarEncoder.encodeBytes 1.6 times, and reading every entry of a zip 1.5 times.
ZLibDecoder.decodeBytes and GZipDecoder.decodeBytes size their output from maxOutputSize or the input length.ZipFileEncoder is about 15% faster at level 1 and 4% at
level 6 on a 256 MB file, for the same output bytes.Deflate no longer clears its new hash table, which took most of the time of deflating a small input: 20000
inputs of 200 bytes take a third of the time. Added inputSize to Deflate and Deflate.stream, which sizes the
window and literal buffer to a small input of known length without changing the output. The web ZLibEncoder,
GZipEncoder and ZipEncoder pass it.ZLibDecoder.decodeBytes inflates straight into its result instead of into a second buffer that was
then copied.XZEncoder.encodeBytes is about 18x faster for inputs under 32 KB.BZip2Encoder sizes its buffers to a known input: small inputs are 1.25x faster, 4x on wasm.BZip2Encoder.encodeStream reads in 64 KB pieces: about 14% faster on dart2js.ZstdEncoder.encodeBytes is about 1.3x faster for inputs under 32 KB.Deflate is 10-25% faster on dart2js and wasm.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fix prefixed zip local header offsets
Fix prefixed zip local header offsets
XZDecoder, TarDecoder, ZipDecoder, GZipDecoder, ZLibDecoder,
BZip2Decoder and ZstdDecoder) and their wrappers like extractFileToDisk, extractArchiveToDisk,
extractArchiveToDiskSync now share the same contract: by default no damaged data errors are thrown anymore.
If error is needed, specify throwOnError: true to decodeBytes or decodeStream. If checksum verification
is required, specify verify: true to decodeBytes or decodeStream: throwOnError defaults to verify, so a
mismatch or damage throws. With verify: true, throwOnError: false it is reported like no flags do,
decodeStream returns false and decodeBytes returns partial data. All throwOnError are reported as
ArchiveException and checksum exceptions with ArchiveChecksumException that extends ArchiveException.
throwOnError is now bool? in these signatures, so a subclass that overrides them has to follow. Without flags,
a damaged gzip or zlib stream from dart:io now decodes without an error, where 4.5.x threw because dart:io always
checks the trailer. Errors such as RangeError from damaged data are reported the same way as other damage, where
4.5.x rethrew some of them as ArchiveException. Read README for migration tips
and exceptions that are still reported with original type (everything unrelated to damaged data and package code).verify and
throwOnError by default due to the specification of their format so that they completely coincide with dart
zlib and gzip transformers.verify: true param and do not ignore it anymore. GZipDecoder
and ZLibDecoder that rely on dart:io implementation still may not catch the checksum issue and report an error
with throwOnError for some damaged archives: a gzip whose damaged data decodes longer than its declared size
passes as a concatenated gzip, a checksum error inside a concatenated gzip is reported as ArchiveException, and
a truncated zlib stream is found only with verify, and thrown as ArchiveException, as a truncated gzip is.
GZipDecoderWeb and
ZLibDecoderWeb report all of these. Cut raw deflate stream (raw: true) is not found by any flags there,
it has no checksum.writeRange and reserve to OutputStream, and readInto and viewBytes to
InputStream. All four have a default body, so a class that extends them needs no change. A class that implements
them has to add these methods.extractFileToDisk detecting files only by extension. It now also detects them by their header bytes as all
platform decoders do (like MacOS, Windows, Linux). If detection by headers fails it uses old file
extension format instead.ZipDecoder and extractFileToDisk throwing Exception for an incorrect password, or returning wrong data
for ZipCrypto. They now throw ArchivePasswordException that extends ArchiveException. This
exception overrules throwOnError and is thrown always when password does not match. AES MAC
is checked now, a mismatch throws ArchiveMacException that extends ArchiveChecksumException regardless of flags.extractArchiveToDisk and extractArchiveToDiskSync throw with ArchivePasswordException as well for
bad password case.ArchiveLimitException that extends ArchiveException. It is thrown regardless of verify and
throwOnError when decoded data is larger than maxOutputSize, when extracted files are larger than maxSize,
when a zstd window is larger than maxWindowSize, when an xz block declares a dictionary larger than
maxDictionarySize, when a tar long name, PAX header or sparse map is larger than TarFile.maxMetadataSize, and
when a compressed zip entry decodes to more than its declared uncompressed size.listTarFiles and extractTarFiles silently using only the readable part of a damaged archive. They now
throw an error for it.lastModTime of zip entries is now in seconds since epoch, as in tar, instead of the DOS date
and time format. The DOS value it held before, date << 16 | time, is now in ArchiveFile.lastModDosTime.extractFileToDisk now accepts verify and throwOnError, extractArchiveToDisk and
extractArchiveToDiskSync accept throwOnError. Without them a damaged or cut archive no longer throws: Complete
entries are extracted, and damaged ones leave no partial files on disk. With throwOnError the function throws
an exception upon encountering the first corrupted entry, and verify adds checksum checks to it.CompressionType has new values, lzma and xz, so a switch over it needs a case
for each of them.TarEncoder writing a tar hard link read by TarDecoder as a symlink, which pointed to a missing file. It
now writes it back as a hard link.AesDecrypt, use the exported AesCtr instead. AesDecrypt is now a wrapper over AesCtr and gives
the same output as before. Sha1, HmacSha1, pbkdf2HmacSha1 and Sha256 are exported as well.ZstdDecoder throwing ArgumentError for a malformed dictionary. It throws ZstdDictionaryException, which
extends ArchiveException, since a dictionary can be damaged data as well as a wrong argument.ZstdEncoder throwing ArgumentError for a level above 22 or below zstdMinLevel. It clamps the level to
that range, as ZSTD_c_compressionLevel of libzstd does. zstdMinLevel is -131072 instead of -7, the value of
ZSTD_minCLevel().ZstdDecoder accepting a maxWindowSize below 1024 bytes, the smallest zstd window. It throws
ArgumentError for it.ArchiveFile.lastModDateTime returns a local DateTime built from lastModTime in seconds
since epoch, instead of a UTC DateTime built from DOS date and time fields. ZipDecoder takes the time from the
UT extra field (0x5455) when the entry has one, so a zip written by ZipEncoder reads back the same time in every
time zone.ZipDecoder returning the content of the first of several entries with the same name with the metadata of
the last one. It keeps the last one, as 3.x did.extractFileToDisk calls callback for a zip entry after the entry is written, as it does for
tar. It used to call it for every zip entry while the central directory was read, before any file was written.extractFileToDisk extracting junk entries from a gzip, bzip2, xz or zstd file that does not hold a tar, also
when its name ends with .tar.gz or a similar extension. It throws ArgumentError for such a file.BZip2Decoder returning only the first stream of concatenated bzip2 files, as pbzip2 writes them, without
an error. It decodes every stream in sequence, as bzip2 -d does.ZLibDecoderWeb appending the streams after the first of concatenated zlib streams, matching dart:io of Dart
3.5.0, which was reverted as a bug. It decodes only the first and ignores the bytes after it, as ZLibDecoder on
dart:io does since Dart 3.5.2 (dart-lang/sdk#56481).extractArchiveToDisk writes entries synchronously, as extractArchiveToDiskSync does, and still returns a Future.allowAbsoluteSymlinks to extractFileToDisk, extractArchiveToDisk and extractArchiveToDiskSync.
Absolute symbolic links are still skipped by default.\\?\, \\.\ and \\?\UNC\ prefixes, drive letters and leading slashes from entry names, as
bsdtar does. An entry whose name is an absolute path used to be skipped.TarDecoder with verify and tarCodec.decoder throw for a header whose size field is not a number.ZipEncoder writes the CRC and sizes in the local header of a stored entry taken from another zip, which it used to
write with a data descriptor (#421).StreamTransformer/ByteConversionSink/Converter support
(xzCodec, zstdCodec, bzip2Codec, tarCodec and zipCodec) for decode and encode (decoders for
all formats except for zip). xz, zstd and bzip2 are Converters, bytes to bytes; tar and zip are
StreamTransformers: TarDecoderTransformer, TarEncoderTransformer and ZipEncoderTransformer.CodecsRecognizer with ArchiveFormat to recognize compressed file types with their header bytes.verify: true), and SHA-1 with its HMAC and PBKDF2 and AES for AES zip.ProgressOutputStream to monitor progress during unpack.XZDecoder.XZMultithreadOptions.converter and ZstdMultithreadOptions.converter, the options a
Converter takes for multithreaded decoding/encoding via converter.ultra to ZstdEncoderConverter and ZstdCodec. Without contentSize levels 20-22 are reduced to 19
unless ultra: true is given, as zstd does without --ultra: level 22 of unknown size takes 655 MB even for
100 bytes of input. ZstdEncoder knows the input size and takes these levels without the flag.Crc64 class). Old api isCrc64Supported
remained unchanged and still returns false and throws with getCrc64 on dart2-js.decodeStream.GZipDecoder.decodeBytes and ZLibDecoder.decodeBytes on dart:ioZLibDecoder.blockSize100k to BZip2Encoder.encodeBytes and encodeStreamArchiveFile.isHardLink, set by TarDecoder for tar hard links. symbolicLink is unchanged.extractFileToDisk that could overwrite existing file on disk outside of output dirZipDecoder for archives created on Windows.ZipDecoder reading a zip entry name that is not valid UTF-8 as Latin-1. It reads it as CP437, the encoding
zip tools use when the UTF-8 flag is not set, so such names list differently than in 4.5.1. Pass
ZipDecoder(filenameEncoding:) to read them in another encoding.ZipDecoder ignoring the Info-ZIP Unicode Path extra field (0x7075). An entry that has one lists under the
UTF-8 name from that field, so names differ from 4.5.1. The field is used only when its CRC matches the stored name.XZEncoder files created on dart-js failed to decode on native platforms.ZLibDecoder on web.TarEncoder now writes "ustar\0" magic in header for easier recognition.TarEncoder now writes non-ASCII names and symlink targets as PAX path/linkpath records, so readers that take
header bytes in a local code page, such as Windows tar.exe, get the right names.ZipDecoder tries UTF-8 first
and then bytes that older versions of the package wrote.ZipDecoder decrypting AES and ZipCrypto entries inside the buffer, what corrupted it.ZipDecoder and encoding for ZipEncoder with CompressionType.lzma. Encoder
still falls back to DEFLATE, but decoder properly reads lzma data.ZipDecoder now reads zstd (method 93) and xz (method 95) zip entries as CompressionType.zstd and
CompressionType.xz, and ZipEncoder writes them with ZstdEncoder and XZEncoder. XZEncoder stores data
uncompressed, so an xz entry is not smaller than its data.TarDecoder and tarCodec.decoder now read sparse files the way libarchive does: old GNU sparse headers with
extension blocks and PAX sparse formats 0.0, 0.1 and 1.0. Holes are expanded when the content is read.mode 0 file rights for ArchiveFile from ZipDecoder created on Windows.verify: true.ZipEncoder and decoding non-ASCII names with macos unzip from archives of this package.TarEncoder with non-ASCII file names.ArchiveFile.directory mode (0755 instead of 0644) so that it can be opened after unpacking.XZDecoder.XZDecoder.decodeStream.BZip2Decoder throwing RangeError on an archive cut inside a block when it read from an
InputMemoryStream. Both memory and file streams return false now, without inconsistency.ArchiveException now, the way a damaged deflate entry already did.ZipEncoder now applies CompressionType.none to entries with no content.ChunkedConversionSink with ZLibOutputSink for gzip and zlib to forward every piece the codec produces
instead of holding it to the end.ZipEncoder with a password writing a stale MAC into entries that have no content, such as
every directory. The local header declared 12 bytes it never wrote, which left every local header
after it off by 2 and unreachable to a forward-only reader.ZipEncoder(streamed: true) that writes entries as they are read, with low RAM usage on big files
(4GB+, uses zip64 format from zip APPNOTE).ZipDecoder.XZDecoder.decodeStream now stops at the first broken block, like the single threaded one.ZipDecoder returning an empty archive for a zip with extra bytes in front of it (self extracting zips).ZipDecoder throwing RangeError instead of ArchiveException for some damaged zips.LzmaDecoder throwing RangeError for truncated or damaged LZMA data, and XZDecoder reading more bytes
than the input has for a stream cut inside a stream header, block header, LZMA2 chunk header, index or footer. They
throw ArchiveException and report a truncated stream.LzmaDecoder stops at the end marker of an LZMA stream of unknown size, as NSIS installers store them, instead of
failing. endMarkerSeen tells whether it did. XZDecoder rejects an LZMA2 chunk that has one, which LZMA2 does not
allow.verify, a wrong CRC in an xz stream header, block header, index or footer, and a wrong gzip header checksum
(FHCRC), throw ArchiveChecksumException instead of ArchiveException. GZipDecoderWeb checks the header
checksum.TarDecoder adding garbage folders to names in archives made by GNU tar --incremental.TarDecoder treating some folder entries (GNU and very old tar formats) as files.TarDecoder long names in archives made by older versions of this package.BZip2Decoder rejecting some valid archives and data after the end of an archive, same as bzip2 1.0.8.XZDecoder failing on archives larger than 4 GB on the web.InputFileStream.toUint8List and readBytes returning wrong bytes when a file is read in parts.GZipDecoderWeb and ZLibDecoderWeb are ~60x faster when writing to a file now.ZipEncoder emptying ArchiveFile.stream entries, so they could not be read after encoding.ZipEncoder with a password changing the original data of entries in memory.extractFileToDisk never returning when the output drive does not exist.XZDecoder hanging on a truncated file and accepting some damaged archives that single
threaded decoding refused.BZip2Decoder crashing on an archive that declares block size 0.ZipDecoder with verify: true rejecting AES zips that store no CRC.ZipEncoder writing a wrong CRC when encoding again an archive decoded from an AES zipArchiveFile.stream now takes the stream from its current position instead of from the start.ZipEncoder failing to create on the web.TarDecoder with verify: true now reports a file that is cut short, like other tar tools do.ZipEncoder zip64 for small files that follow large ones and for entries over 4 GB.InputFileStream ignoring its byteOrder for readUint16, readUint24, readUint32 and readUint64.ZLibDecoderWeb and GZipDecoderWeb depending on the byte order of the input stream: decodeStream
failed verify on a whole zlib stream from a little-endian stream, and gzip failed on a big-endian one.ZLibDecoderWeb dropping the decoded data when bytes follow the stream, and accepting an empty input.ZipDecoder returning the raw compressed bytes as the content of an entry with an unsupported compression
method. With throwOnError or verify reading that entry throws ArchiveException, without them it is empty,
and extractFileToDisk skips it and extracts the rest.OutOfMemoryError for a zip64 entry
that claims terabytes.listTarFiles listing a plain .tar as empty, and listTarFiles and extractTarFiles leaving open files
and temporary folders uncleaned.ZLibDecoderWeb and GZipDecoderWeb accepting malformed deflate: a zlib header with a method other than
deflate or a window over 32 KB, a stream without its final block, and an oversubscribed Huffman table, which
decoded to garbage before, are now reported with throwOnError and verify.ZipFileEncoder.store writing entries as deflate level 0 and holding each whole entry in memory: a 1 GB
file needed 2 GB of RAM. The store level of create, zipDirectory, addFile, addFileSync and
addDirectory now writes uncompressed entries (method 0) streamed from the file. An ArchiveFile given to
addArchiveFile is stored too, unless its compression is set.ZipFileEncoder holding each whole deflated entry in memory: a 920 MB file needed 1042 MB of RAM at level 1
and 667 MB at level 6, now 19 MB at every level. ZipFileEncoder now uses ZipEncoder(streamed: true), so a
deflated entry without a password has bit 3 set, zero CRC and sizes in its local header, and a data descriptor
after its data. The archives decode the same, but their bytes differ from earlier versions.OutputFileStream.writeStream moving the read position of its source to the end, unlike the other
OutputStream types. The source position is now left unchanged.ZipDirectory.read no longer reads every entry's local header. A ZipFileHeader reads its file when it is first
asked for, and leaves the stream where it was. ZipDecoder reads each entry's file as before. Code that uses
ZipDirectory directly has to keep the stream open until it has read file, and gets an error in a local header
from file instead of from read.ZipDirectory.headers, which reads the central directory one entry at a time as it is iterated, so a
caller that walks a large archive holds one header at a time. ZipDirectory.read collects it into fileHeaders
as before. With files: false the headers keep no reference to the stream, for a caller that reads entries itself.Fixed ZipDecoder.decodeStream returning an empty archive when the input was not at position 0, such as after reading a magic number or decoding the sa
ZipDecoder.decodeStream returning an empty archive when the
input was not at position 0, such as after reading a magic number or
decoding the same stream a second time (#405). decodeStream also
leaves the input's read position where it was.InputStream.totalLength, the size of the whole stream whatever
the read position, where length is only the bytes after it.Fixed zips written on the web, which decoded to nothing: the zlib encoder left the zip encoder's output big-endian, so every header after the first en
ZipEncoder can be used under dart2js on Node, where creating its secure
random source threw; it is now only created for a password.ZipEncoder since 4.4.0, which 7-Zip reported
as having header errors: the data descriptor flag was set in each
entry's local header but not its central directory header. The UTF-8
flag also went into the central directory even for names that were not
UTF-8.unzip rejected, and carry the MS-DOS directory
attribute. In a zip with a password they are no longer marked
encrypted.ZipInputStream refuses a
stored entry with a descriptor, and OpenDocument and EPUB files need
their stored mimetype entry without one (#421).Security: XZDecoder hung forever on a truncated .xz read from a file or a decode stream, including .tar.xz in extractFileToDisk.
XZDecoder hung forever on a truncated .xz read from a
file or a decode stream, including .tar.xz in extractFileToDisk.TarFile.maxMetadataSize (1 MB). A small .tar.gz could declare one
large enough to take gigabytes of memory to read.maxOutputSize to decodeBytes and
decodeStream on GZipDecoder, ZLibDecoder, BZip2Decoder and
ZstdDecoder, and maxSize to extractFileToDisk,
extractArchiveToDisk and extractArchiveToDiskSync.ArchiveFile.size can be checked before reading.ZstdDecoder sized its window and output from the frame header,
so a 10 byte input committed hundreds of MB, even past maxWindowSize.
The content size is now checked as each block decodes, and one that
overflows is refused.XZDecoder limits the LZMA2 dictionary an archive may declare
to maxDictionarySize (256 MB by default), which bounds the memory a
streaming decode takes. It also takes maxOutputSize, and no longer
preallocates gigabytes because a tiny archive's index claims them.extractTarFiles did not keep entries inside the output
directory. It now extracts as extractFileToDisk does, decoding as it
reads rather than through a temp file it left behind.TarDecoder.decodeStream and decodeBytes take keepEntries. False
passes entries only to the callback, so memory no longer grows with the
entry count; extractFileToDisk uses it. A .tar.gz of a million empty
entries now decodes in 39 MB rather than 326 MB.RangeError
instead of ArchiveException. The AES extra field is also found when
other extra fields come before it.BZip2Decoder accepts a block declaring more than 18002 selectors and
ignores the extra ones, as libbzip2 does, instead of reporting a
truncated stream.Security: a crafted zip64 compressed size overflowed the stream bounds checks and could crash the decoder while reading an untrusted archive. Sizes ar
InputDecodeStream and decodeLazy on GZipDecoder, ZLibDecoder,
BZip2Decoder, ZstdDecoder and XZDecoder, which decode a stream as it
is read so a large archive can be piped into another decoder without a temp
file.extractFileToDisk extracts .tar.gz, .tar.bz2, .tar.xz and
.tar.zst in a single pass, writing each entry as it is reached, with no
temp file.ZipEncoder, and encrypted zip entries (ZipCrypto and AES) now
work in a bounded amount of memory whatever the file size.getCrc32 is about three times quicker on typed data, and
InputFileStream reads in larger blocks.XZEncoder, which produced archives other tools rejected for inputs
of 128 bytes or more.Deprecated the fileSize parameter of the FileBuffer read methods, which is ignored.
ZstdDecoder, a pure Dart decoder for the zstd (Zstandard) format.ZstdEncoder, a pure Dart zstd encoder for the VM, JavaScript and
wasm, at levels -7 to 22.extractFileToDisk and the tar command accept .tar.zst and .tzst, and
TarFileEncoder.tarDirectory can write .tar.zst with
compression: TarFileEncoder.zstd.XZMultithreadOptions
to decodeBytes or decodeStream spreads the work over isolates, one xz
block per job, and reports the result through its onDone callback. Both
methods behave exactly as before when it is omitted. On a 1.1 GB archive of
six blocks: 16.1 s single threaded, 8.0 s on the default three workers,
5.0 s on six.decodeStream reading from an InputFileStream now lets each worker read
its own block straight from disk, so the compressed archive never passes
through the calling isolate. Decoding a 1.1 GB archive to an
OutputFileStream peaks at 1.8 GB, below the 3.0 GB the single threaded
path uses, while being twice as fast.InputFileStream.fileBuffer, fileOffset and fileLength.--x86 flag support to XZDecoderverify: true)uncompressedSize getter for XZDecoder, returning the original file
size before compression.throwOnError to XZDecoder.decodeBytes and decodeStream. Without
it a malformed or
truncated archive still returns the partial output with nothing to say it is
not the whole file, which was the only decode with no way at all to report a
failure. In multithreaded mode the exception is delivered to
XZMultithreadOptions.onError, and setting throwOnError without an
onError is now refused rather than losing the failure.verify: true was used with an output that cannot be read back, such as an
OutputFileStream or any multithreaded decode. The output now stops in the
same place whichever way the decode was asked for.XZDecoder.maxPreallocateSize, capping how large an output buffer is
allocated from a size the archive itself declares. Defaults to
xzDefaultMaxPreallocateSize, 2 GB natively and 256 MB on the web.XZMultithreadOptions.fileReadBufferSize.xz --check=none archive with corrupt blocks passed verify: true.TarDecoder with verify: true now checks each header's own checksum and
throws ArchiveException on a mismatch.size record was applied to the metadata headers following it
rather than to the entry it describes.././@LongLink header of type K set the next entry's name
instead of its symlink target.storeData: false skipped the tar long name and PAX headers along with
the file data, losing the names they carry.verify: true the end of a tar is a full 512 byte zero block, which
two zero bytes could not be told apart from a damaged header. A tail shorter
than a header block now ends the archive instead of decoding as junk.TarFile.maxNumericField are refused on
read and write instead of overflowing silently.L and K
type flags, so other tar implementations truncated them to 100 bytes, and
long symlink targets were not written at all.filenameEncoding.TarEncoder copies a stored stream through in chunks rather than reading the
whole entry into memory.TarFile.content is now settable and reads back what was set.GZipDecoder.decodeStream returned true for a truncated or corrupt
archive, silently losing files.verify: true.FileBuffer reads refilled the cache one byte early, costing
a re-read on every buffer-aligned access.InputFileStream.subset did not clamp its length to what remains of the
source, so peeking past the end returned stale bytes.fileSize parameter of the FileBuffer read methods, which
is ignored.Optimize performance and issues with large files with XZDecoder.
Fix: RangeError when parsing ZIP extra fields with trailing bytes.
Fix extractFileToDisk file extension handling, where foo.bar.zip would fail. *
Remove dependency to crypto package
Change posix dependency to 6.0.2.
Fix zip decoding when the last file of the archive is also a zip.
Improve performance of OutputFileStream.
Fix level argument for ZipEncoder.add method.
Fix potential infinite loop when parsing zip headers.
Fix import error with js_interop.
Fix error with GZip encoder for web builds.
Major cleanup of the code, includes potential breaking changes.
Fix ArchiveFile.rawContent returning null after decoding a zip.
Fix zip encoding when a file was previously decoded.
Re-add zipPath to ZipFileEncoder.
Remove dependency to pointycastle package
* Fix ZipCrypto decryption
Revert breaking change for extractArchiveToDisk becoming async; add extractArchiveToDiskAsync for the async version.
Improve zip decompression performance with dart:io by using native ZLib decompression when possible.
Improve performance by not using List.setRange for copying bytes, which turns out to be very slow.
Fix for Zip64 file size causing memory errors.
Rewrote InputFileStream to reduce overall memory by using a shared file cache.
DateTime lastModDateTime getter to ArchiveFile.Fix for new default buffer size for InputFileStream consuming too much memory for large archives.
Fix bug in InputFileStream that caused it to only have an 8-byte buffer, making file streaming slow.
Add bzip2 decompression for zip files.
Fix for decoding zip64 zip files that have multiple extra fields.
Add Zip64 support to ZipEncoder to allow it to create zip files > 4GB.
Fix for extractFileToDisk causing corrupt files by closing a file stream before it finished writing.
Fix for zip security issue with symlinks, https://github.com/brendan-duncan/archive/issues/265. https://osv.dev/vulnerability/GHSA-9v85-q87q-g4vg.
Fix symlink encoding for tar files
* Fix errors decoding XZ files.
Fix file content when decoding zips
* Fix analysis errors.
Support symlinks in ZIP archives
Fix for UTF-8 file name caused problem on Windows.
Fix for Inflate crashing on some compressed files.
IO encoders (ZipFileEncoder, TarFileEncoder), will now include directories and empty directories.
Re-add List content data for ArchiveFile.
Added buffer to OutputFileStream to improve performance by reducing the number of file writes.
For non-web applications, use native 'inflate' decompression when decompressing zip files.
Fix indexing bug in Archive.addFile.
Fix performance regression with Archive.
Fix FileInputStream to work with ZipDecoder.
Catch invalid UTF8 string decoding.
* Fix for UTF8 filenames
Fix problem with non-terminating long filenames.
Disable XZ format CRC64 for html builds to fix errors.
* Changed LICENSE to MIT.
Cleaned up LICENSE, moving other licenses to LICENSE-other.md.
Added the ability to override the timestamp encoded in a Zip file.
Fix zip encoder so that zip files created on Windows will open correctly on Linux.
Stable release supporting null safety.
One column per quarter.