Commit Graph
17 Commits
Author SHA1 Message Date
Kenneth SkovhedeandCopilot 3ec07aaee1 Added zstd compression
This PR adds experimental support for using either ZStandard or GZip compression. Unlike the Zip module, which also supports these methods, the new module does a full-volume compression which is both much faster and compresses better with modern compression algorithms.

Because the compressor can see the full volume (and not just the blocks) it can compress data across blocks.

The downside to this is that it is not possible to take a single entry out of the compressed stream, but instead, Duplicati needs to decompress the whole stream and can then access the contents.

To make the implementation compatible with standard tools, the inner format is Tar (using ustar format). To allow faster reading, a small end-of-file header is added to the Tar file, emulating the concept from Zip files.

This small addition allows Duplicati to have random access to files in a Tar volume without needing to scan the whole thing.

To make sure data is always recoverable, the format is 100% compatible with regular tools, so `untar -xf` will work on the created volumes.

The downside is an extra pass for decompression when reading the volumes. When writing, each entry (a block of data most commonly) is written to a temporary file before being added to the output stream. It is possible to toggle this to use a memory buffer for even more speed up.

The ZStandard compression is from `ZstdSharp.Port` which has excellent performance.

When we move to .NET11 this can easily be changed to the new built-in module.

Since this is the first attempt to add this, it will log a warning on each use, explaining that the feature is currently just for testing.

Co-authored-by: Copilot <copilot@github.com>
2026-04-30 13:03:24 +02:00
Kenneth SkovhedeandGitHub c54a278050 Merge pull request #6844 from duplicati/feature/copyright-bump-2026
Updated copyright year to 2026 across the project
2026-04-17 12:34:06 +02:00
Kenneth Skovhede c0f40e19ca Updated copyright year to 2026 across the project 2026-04-16 15:21:24 +02:00
Kenneth Skovhede 927079613d Fixed compression level issues 2026-04-13 14:23:09 +02:00
Kenneth Skovhede 3faa674906 Update SharpCompress
This PR updates SharpCompress to latest version.
Also adds support for choosing ZStandard as a compression method.

This fixes #4333
2026-04-06 16:53:05 +02:00
Kenneth Skovhede aecccbec0e Removed incorrect compression level text
This fixes #6240
2025-05-20 20:23:36 +02:00
Kenneth Skovhede a70ee1e5e4 Nullability fixes 2025-04-03 16:45:07 +02:00
Kenneth Skovhede c3b0392cbc Removed option to toggle zip64 2025-03-31 13:26:00 +02:00
Kenneth Skovhede a7d5bf1de6 Fixed toggling zip64 2025-03-31 13:24:26 +02:00
Kenneth Skovhede b4a5820cf4 Fixed incorrect dispose logic 2025-02-07 14:06:57 +01:00
Kenneth Skovhede adbd6b6a7c Added support for fallback when reading zip files with unsupported compression methods 2025-02-06 21:35:49 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +01:00
Kenneth SkovhedeandGitHub 382ba172b3 Fixed duplicate entries in index files (#5856)
* Added test to verify that compression modules will mask duplicate entries, if present

* Because there are likely many, otherwise valid, dindex zip archives with duplicated blocklists out there, the log message is now verbose.

To make sure we no longer create archives with duplicated entries, the `--unittest-mode` option makes this a warning that is checked in most tests.

* Added guard in `IndexVolumeCreator` to prevent creating zip files with duplicated block lists.

* Added debug check for duplicates

* Fixed the duplicate test
2025-01-10 09:24:31 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede d46188427f Merge remote-tracking branch 'origin/master' into feature/remote-control-support 2024-10-02 14:53:00 +02:00
Kenneth Skovhede 3f88ea7074 Merge remote-tracking branch 'origin/master' into feature/support-built-in-zip 2024-09-09 17:25:22 +02:00
Kenneth Skovhede 611066f9cb Add support for using the faster built-in .NET zip. 2024-07-29 14:09:26 +02:00