DWARFS

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Added more details in FormatInfo, added Identification section as well as Discussion. Added the possibility to not use compression and/or deduplication.)
(Added link for magic bytes, only for FormatInfo.)
Line 4: Line 4:
 
|subcat=Filesystem
 
|subcat=Filesystem
 
|compression=lossless, optional
 
|compression=lossless, optional
|magic=44 57 41 52 46 53
+
|magic=[https://github.com/file/file/blob/master/magic/Magdir/dwarfs#L27 44 57 41 52 46 53]
 
|released=2020 <ref>[https://github.com/mhx/dwarfs/releases/tag/release-0.1.0 Release 0.1.0 - GitHub]</ref>
 
|released=2020 <ref>[https://github.com/mhx/dwarfs/releases/tag/release-0.1.0 Release 0.1.0 - GitHub]</ref>
 
}}
 
}}

Revision as of 11:05, 16 August 2025

File Format
Name DWARFS
Ontology
Compression lossless, optional
Magic Bytes 44 57 41 52 46 53
Released 2020 [1]

Deduplicating Warp-speed Advanced Read-only File System (DWARFS) is a read-only filesystem that optionally supports no compression (via --compress-level=0 or --compression=null for instance) and no deduplication (via --file-hash none. It is developed by Marcus Holland-Moritz and when compared to Squashfs, DWARFS also offers a choice of hashing algorithms,[2] as well as a tool for checking DWARFS image via dwarfsck. At maximum compression levels using LZMA, DWARFS (using --compression=lzma:level=9:extreme) can produce smaller file size compared to SquashFS with the rough equivalent of using XZ as -comp xz.

See also Squashfs.

Contents

Discussion

The aim with this software project is to ultimately create a compressed, deduplicated, read-only file system. While it is possible to disable all except for read-only, disabling it defeats the purpose.

DWARFS software project also intends to compete (performance-wise) with SquashFS at file system creation, in that a given directory, folder, or path is scanned, hashed, (optionally categorized) before the contents are compressed, adding only the unique copies. SquashFS tends to add and hash files as it creates the file system, similar to how 7-Zip or ZIP files for instance are created, with the apparent ability to detect and avoid adding duplicate files during creation process that is unique to the likes of SquashFS and DWARFS, which however is considered slower, generally double-handling compared to DWARFS which does these during the scanning phase.

The developer's original motivation was with, "several hundred different versions of Perl that were taking up something around 30 gigabytes of disk space" and that there, "was unwilling to spend more than 10% of my hard drive keeping them around for when I happened to need them."[3] This may put the project in line for competing with git, which is a Versioning Control System (VCS), that is used to record changes to a given project at a more atomic level, compressing (and using zlib) changes with each commit, however, unlike git which introduces rather steep learning curves, contrasting to just adding several versions of the same software project into an "archive" is arguably more trivial to do. Ultimately, DWARFS, like SquashFS has many other potential use-cases, rather than whatever they were intentionally designed for, making it a somewhat popular choice in the race against other forms of archivers and software/file distribution methods, without requiring the use of bespoke compression software that happens to be ranked among the top in Matt Mahoney's data compression benchmarks.

Identification

DWARFS files begins with the hexadecimal 44 57 41 52 46 53 which translates to "DWARFS" in ASCII.[4]

Examples

Create an extremely compressed DwarFS image, without history, all root owned contents, sha3-512 hash algorithm, idle task (lowest priority) from present directory to example.dwarfs:

 mkdwarfs --input . --output=example.dwarfs --block-size-bits=26 --compression=lzma:level=9:extreme --compress-niceness=10 --schema-compression=lzma:level=9:extreme \
 --metadata-compression=lzma:level=9:extreme --no-history --pack-metadata=all,force --file-hash=sha3-512 --set-owner=0 --set-group=0 --no-history-timestamp \
 --no-create-timestamp --no-history-command-line

Links

References

  1. Release 0.1.0 - GitHub
  2. Choice of hash for duplicate detection #92 - GitHub
  3. History section - DWARFS - GitHub
  4. 0000449: Add magic for the DWARFS compressed file system format - bugs.astron.com
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox