Skip to content

feat(compression): add reversible Huffman coding - #4

Merged
artiphishle merged 1 commit into
mainfrom
add-huffman-compression-10554524431435534885
Oct 3, 2026
Merged

artiphishle merged 1 commit into
mainfrom
add-huffman-compression-10554524431435534885

Conversation

@google-labs-jules

@google-labs-jules google-labs-jules Bot commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add lossless Huffman Coding (1951) compression and decompression
  • use a deterministic self-contained binary format instead of Java object serialization
  • handle single-symbol inputs, arbitrary byte values, malformed/truncated payloads, and empty input
  • integrate Huffman into the current editor without losing RLE or LZW
  • generate both Compress and Decompress UI actions from one shared helper so compression algorithms are always exposed symmetrically
  • add JUnit round-trip coverage for Huffman, RLE, and LZW
  • add repository CI for the Java build/test suite
  • document the algorithm and reversible format

Reversibility invariant

Every compression algorithm exposed by Eddy must provide and validate both directions:

decompress(compress(input)) == input

The same principle applies to encryption algorithms: every encrypt operation must have its matching decrypt operation.

Validation

  • Huffman round-trip validated for empty input, repeated single-symbol data, UTF-8 text, all 256 byte values, and random binary payloads
  • malformed Huffman payload rejection covered
  • repository test suite included via Gradle/JUnit

Closes #1

@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@artiphishle
artiphishle force-pushed the add-huffman-compression-10554524431435534885 branch from 571fc50 to dc8bebf Compare October 3, 2026 05:12
@artiphishle artiphishle changed the title Add Huffman Coding compression (1951) feat(compression): add reversible Huffman coding Oct 3, 2026
@artiphishle
artiphishle marked this pull request as ready for review October 3, 2026 05:12
@artiphishle
artiphishle merged commit a046e4f into main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Huffmann Coding compression (1951)

1 participant