uorc

Compress files and folders into .uorc archives, and restore, inspect or verify any .uorc archive, in this browser.

Your files stay on this device: the page reads them, runs the uorc WebAssembly client in a background worker and hands the result back as a download. Nothing is uploaded.

Use uorc here

  1. Pick what to do: Compress, Decompress, Inspect or Verify.
  2. Choose the files, folder or archive it asks for.
  3. Press the button under the fields, then save the result. Cancel stops a running operation at once.

Make a .uorc archive from files or a folder.

One file becomes NAME.uorc with exactly the bytes the uorc command line writes. Several files or a folder become one archive that keeps their relative paths.

One or more files. Choosing files clears a chosen folder.

Every file under one folder, with its relative paths. Choosing a folder clears chosen files.

Loading the uorc WebAssembly client…

Examples

Each example compresses a built-in input in this page, decompresses the archive again and checks that the bytes are identical.

InputBytesArchive bytesRound tripSeconds

What the codec claims

The statements this release makes about its own performance, as the factory decided them: theorems checked for every input, exact sizes and step counts on named corpora, and the state of the engine that searches the codec space. Each codec point and corpus is named by its κ, a SHA-256 identity.

Performance theorems and measurements

ClaimStatementEvidence

Closed claims

FormCodec point κCorpus κBytesStepsDecided

Engine

StrategyFamilyWeight

What the page does

uorc is Universal Object Reference Compression. Each archive is an exact executable object reference: it carries the program that rebuilds the original, and an integrity seal over itself.

This page runs the same uorc client as the command line, compiled to WebAssembly. Compress writes the same bytes, Decompress reads every archive the command line writes, and Verify checks an archive without saving anything.

Large inputs stream through 8 MiB frames, so a file of any size goes through a few frames of memory at a time. Several files or a folder are compressed together in memory as one archive of ordered objects: a manifest of relative paths, then each file.

Use uorc elsewhere

Command line

uorc compress --stats notes.txt      # writes notes.txt.uorc
uorc decompress notes.txt.uorc -o notes.restored.txt
cat data.bin | uorc compress - > data.uorc   # any size: streams through 8 MiB frames
uorc compress --threads 4 big.tar     # frames compress in parallel
uorc decompress --threads 4 big.tar.uorc   # blocks of frames decode in parallel
uorc compress photos/                 # writes photos.uorc (a whole tree)
uorc decompress photos.uorc -o restore/   # --resume finishes an interrupted restore
uorc inspect notes.txt.uorc           # per frame: header, integrity, codec point and steps; no decoding
uorc verify notes.txt.uorc notes.txt  # decode, check, compare
# Outputs are written to a temporary file and renamed into place; --force replaces.
# Exit status: 0 ok, 2 usage, 3 I/O, 4 invalid archive or integrity, 5 step budget,
# 6 overflow, 7 differs from the original.

Rust library

let archive = uorc::compress(&bytes, uorc::DEFAULT_STEPS)?;
let original = uorc::decompress(&archive, uorc::DEFAULT_DECODE_WORK)?;
assert_eq!(original, bytes);
let info = uorc::inspect(&archive)?;           // header + integrity, no decode
let point = uorc::performance::CodecPoint::of(&info); // basis, profile, state, lanes; point.kappa()
uorc::verify(&archive, Some(&bytes), uorc::DEFAULT_DECODE_WORK)?;
let many = uorc::compress_objects(&[a, b, c], uorc::DEFAULT_STEPS)?;
let parts = uorc::decompress_objects(&many, uorc::DEFAULT_DECODE_WORK)?;
// Or stream between any reader and writer, with bounded memory:
uorc::compress_stream(reader, writer, uorc::DEFAULT_STEPS, uorc::default_threads())?;

JavaScript (this page's module)

import { load } from "./uorc.js";
const uorc = await load("./uorc_bg.wasm");
const archive = uorc.compress(new TextEncoder().encode("hello hello hello"));
const original = uorc.decompress(archive);
uorc.inspect(archive);                 // [{ representation, codec_point, steps, integrity_ok, ... }]
uorc.verify(archive, original);        // throws if it does not reproduce original
const bundle = uorc.compressFiles([{ path: "a.txt", data }, { path: "d", kind: "directory" }]);
const files = uorc.decompressFiles(bundle); // [{ path, kind, data }]
// Files of any size, one frame in memory at a time:
const blob = await uorc.compressBlob(file);
const back = await uorc.decompressBlob(blob);
// Folders of any size, the same way:
const tree = await uorc.compressTreeBlob([{ path: "d", kind: "directory" }, { path: "d/a.txt", blob: file }]);
const entries = await uorc.decompressTreeBlob(tree); // [{ path, kind, blob }]