Metric | Value | Copy |
---|---|---|
Original size | {{ formatBytes(originalSize) }} | |
Compressed size | {{ formatBytes(totalCompressedSize) }} | |
Saving | {{ savingPercent }} % | |
Parts | {{ parts.length }} | |
SHA-256 | {{ sha256Hex }} |
File compression is the process of encoding data to reduce its byte size. Also called archiving, it can combine multiple items into one stream while preserving path names in browser‑based file compression. Many archival formats track metadata using compact headers, and one widely used layout is the USTAR header for portability.
It accepts files as input and maps them into a lossless container using a chosen algorithm. The engine filters hidden paths or exclusion patterns, flattens folder structure on request, then compresses and optionally groups content into an archive or a single compressed stream. It reports the new size and saving percentage plus optional split parts and a SHA‑256 hash for integrity.
Imagine packaging a project folder of images, scripts, and documents using ZIP, leaving already‑compressed media unaltered, and sharing the result with a short verification hash. Seeing a saving near forty percent signals faster transfers without changing the content. Compression of media already stored in efficient formats may offer little benefit, so test and adjust levels.
The engine supports these lossless modes: ZIP with deflation, ZIP with storage only, TAR without compression, TAR.GZ using gzip, and TAR.BR using Brotli. GZ or BR operate on a single file; when multiple inputs are present, they are first grouped into a TAR stream and then compressed. A configurable level controls speed versus size where applicable. Hidden files and exclusion globs can be removed. Optionally, long paths are flattened, the output is split into fixed‑size parts, and a SHA‑256 digest is computed for the final artifact.
Symbol | Meaning | Unit/Datatype | Source |
---|---|---|---|
O | Total size of included files | bytes (integer) | Derived |
C | Compressed size (or sum of parts) | bytes (integer) | Derived |
S | Saving percentage | % (one decimal) | Computed |
L | Compression level | integer (0–9 or 0–11) | Input |
A | Algorithm | enum | Input |
M | Split size per part | MB (decimal; 1×10⁶ B) | Input |
P | Number of parts | integer | Derived |
H | Integrity hash | SHA‑256 hex (64 chars) | Computed |
F | Flatten paths option | boolean | Input |
X | Exclusion patterns | string (globs) | Input |
K | Skip hidden (dotfiles) | boolean | Input |
Threshold Band | Lower Bound | Upper Bound | Interpretation | Action Cue |
---|---|---|---|---|
TAR or ZIP (Store) | 0 | 0 | Level setting is ignored. | Leave any number; outcome unaffected. |
ZIP / GZ | 0 | 9 | Higher values reduce size at the cost of speed. | Increase for text; lower when speed matters. |
Brotli (BR / TAR.BR) | 0 | 11 | Broader range; higher values spend more time. | Use higher levels when time permits. |
GZ / BR with multiple files | — | — | Files are first grouped into TAR, then compressed. | Expect .tar.gz or .tar.br output. |
A positive saving indicates the compressed artifact is smaller than the original total. Zero or negative values can occur with already‑compressed media or when storage‑only modes are used; that is expected behavior.
Parameter | Meaning | Unit/Datatype | Typical Range | Sensitivity | Notes |
---|---|---|---|---|---|
Algorithm | Compression/container method | enum | ZIP, ZIP(Store), TAR, TAR.GZ, TAR.BR, GZ, BR | High | GZ/BR are single‑file unless wrapped in TAR. |
Compression level | Time versus size tradeoff | integer | 0–9 or 0–11, or ignored | Medium | Ignored for TAR and ZIP(Store). |
Smart compression | Store pre‑compressed types without deflate | boolean | on / off | High | Prevents growth of media and archive files. |
Flatten paths | Drop directory structure | boolean | on / off | Medium | Stores only file names in the container. |
Skip hidden | Exclude dotfiles and dotfolders | boolean | on / off | Low | Affects any path segment starting with “.”. |
Exclude patterns | Comma‑separated globs | string | e.g., *.mp4,*.zip,node_modules/** | High | Anchored, case‑insensitive, slash‑aware. |
Split into parts | Slice the final blob | MB (decimal) | 0, 5, 25, … | Medium | 0 keeps a single file; naming includes .partNN . |
Output name | Base file name | string | derived or user‑supplied | Low | Falls back to folder root or first file. |
Aspect | Policy |
---|---|
Byte display units | KB, MB, GB, TB labels use powers of 1024. |
Split size units | MB means 1×10⁶ bytes per unit. |
Decimal separator | Period (dot). |
Displayed precision | Sizes to two decimals; saving to one decimal. |
Rounding | Native JavaScript toFixed behavior; no custom tie rule. |
Field | Type | Min | Max | Step/Pattern | Error Text |
---|---|---|---|---|---|
Files | File list / folder | 1 (after filters) | — | Drop, pick, or folder selection | “No files to include after applying filters.” |
Algorithm | Select | — | — | ZIP, ZIP(Store), TAR, TAR.GZ, TAR.BR, GZ, BR | — |
Compression level | Range (integer) | 0 | 0 / 9 / 11 | Disabled for TAR and ZIP(Store) | — |
Exclude patterns | Text | — | — | Comma‑separated globs; anchored; case‑insensitive | — |
Split into parts (MB) | Number | 0 | — | Step 1; 0 disables splitting | — |
Brotli compressor | Process | — | — | Quality equals selected level | “Brotli compression failed.” |
General errors | Process | — | — | — | “Compression failed.” |
Scenario: Three files are included after filters. Choose TAR.GZ with level 6 and no splitting.
Result: about 39.5% smaller, one file produced, plus a SHA‑256 hash for verification.
crypto.subtle
support.Category | Extensions |
---|---|
Images | jpg, jpeg, png, gif, webp, avif, bmp, ico, svgz, heic, heif |
Audio | mp3, aac, m4a, ogg, oga, opus, flac |
Video | mp4, mkv, mov, avi, webm |
Archives | zip, rar, 7z, gz, bz2, xz, zst, br, tar |
Documents / Fonts / Images | pdf, woff, woff2, otf, ttf, apk, dmg, iso |
The implementation corresponds to widely recognized specifications: the ZIP archive format (store and deflate modes), the GZIP format, the USTAR TAR header layout, and the Brotli bitstream specification.
Files are processed locally in your browser and not transmitted to any server; the output is downloaded directly from memory. Use hashes to verify integrity when sharing archives.
Follow these steps to compress files efficiently and verify the result.
Warning Splitting uses decimal megabytes; combine parts in order before verifying.
Example: Select 120 photos and 3 videos, choose ZIP with smart store on, set level 6, and export a single archive with a SHA‑256 hash for later checks.
You now have a portable archive with verifiable integrity and clear size savings.
No. Processing and hashing run in your browser; downloads are generated locally from memory. Nothing is uploaded or retained server‑side.
ZIP (deflate), ZIP (store), TAR, TAR.GZ, TAR.BR, and single‑file GZ or BR. Multiple inputs with GZ/BR are automatically wrapped into TAR first.
Yes. Multiple files are grouped into a TAR stream and then compressed, producing .tar.gz
. The same rule applies to Brotli as .tar.br
.
It stores many pre‑compressed types (media, archives, fonts) without deflation to avoid size growth, based on their extensions.
The digest covers the final blob. If split, parts are concatenated in order and the hash is computed over the merged bytes.
It uses exact byte totals; the displayed percentage is rounded to one decimal place for readability.
Display labels KB/MB/GB use powers of 1024. Split size uses decimal megabytes where 1 MB equals 1×10⁶ bytes.
Yes. After the page loads, compression and hashing function without connectivity.
No license text is declared in the package. Generated archives remain your files; verify any redistribution terms that apply to your content.
crypto.subtle
; download is still valid.*.mp4,*.zip
to exclude bulky media and nested archives.