Page actions
instrument mechanism / verified-clean
Compression Ratio Calculator mechanism
The inspectable method record for Compression Ratio Calculator, kept separate from implementation and qualification.
Model scope
The two supplied arithmetic formulas are correct under their domain constraints, but the instrument claims additional outputs without defining their formulas or required data. The honest label is empty and should explicitly state the effective-bits/byte convention, size units and text encoding, that negative savings are possible, and that an entropy lower bound requires a source model rather than only two sizes.
- ratio=original/compressed is standard when both sizes use the same unit and compressed size is greater than zero.
- saving%=(1-compressed/original)×100 is standard when both sizes use the same unit and original size is greater than zero; negative savings are valid when compression increases size.
- No formula is provided for effective bits/byte. A conventional definition is 8×compressed/original, meaning compressed bits per original byte, but this definition must be stated explicitly.
- No formula or required source model is provided for the entropy-limit lower bound. Shannon entropy requires a probability distribution or source model and cannot be derived from original and compressed sizes alone.
- The claim of gzip compression is ambiguous because pure-JS DEFLATE is not necessarily gzip-format output; gzip adds a wrapper and metadata around the DEFLATE stream.
- The pasted-text mode does not define the text encoding or whether original size includes characters, encoded bytes, or other metadata.
Units and conventions
- Original and compressed sizes must be measured in the same unit before calculating ratio or saving percentage.
- For effective bits/byte, this review assumes 8×compressed_bytes/original_bytes, measured as compressed bits per original byte.
- Text sizes should be measured in encoded bytes, with UTF-8 or another encoding explicitly selected and reported.
- Binary prefixes are assumed for displayed units: 1 KiB=1024 bytes and 1 MiB=1048576 bytes.
- Entropy bounds must use the same symbol unit as the reported effective bits/byte; no entropy value is computable from the supplied size fields alone.
Inspectable vector
One of 4 source-bound review vectors:
{
"inputs": {
"original_size": 1000000,
"compressed_size": 250000,
"unit": "bytes"
},
"expected_outputs": {
"ratio": 4,
"saving_percent": 75,
"effective_bits_per_original_byte": 2,
"entropy_limit_lower_bound": null
},
"working": "ratio = 1,000,000 / 250,000 = 4. saving% = (1 - 250,000 / 1,000,000) × 100 = (1 - 0.25) × 100 = 0.75 × 100 = 75%. effective bits/byte = 8 × 250,000 / 1,000,000 = 8 × 0.25 = 2 bits per original byte. Entropy-limit lower bound = unavailable from sizes alone."
}Failure boundary
BREAK_CLAIMED · SELF_FLAGGED
A zero compressed size makes the compression ratio undefined and must be rejected or explicitly reported. The pasted-text mode also has an unresolved character-count versus encoded-byte convention, which can change the reported ratio, saving percentage, and bits per byte.
Other records
Sources and evidence
These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.
VERIFIED_LEDGER.jsonevidence-tranche4/tranche4-results.jsonBOUNDARY_HAZARD_CATALOG.json