Hawkynt

RLE

Simple compression algorithm that replaces consecutive identical bytes with a count-value pair. Most effective on data with long runs of repeated values. Fundamental technique used in many image formats.

Properties

Property Value
Category Compression Algorithms
Sub-category Transform
Security status Not classified
Complexity Not specified
Inventor Unknown (fundamental technique)
Year 1967
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/compression/rle.js

Security

Status: not classified β€” treat as unverified.

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

3 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” Simple repeated pattern - AAABBBCCC

Field Value
input 414141424242434343
expected 034103420343

Vector 2 β€” Mixed run lengths

Field Value
input 4141414141424243
expected 054102420143

Vector 3 β€” No repeated characters

Field Value
input 414243444546
expected 014101420143014401450146

← All algorithms