Questions tagged [compression]
The name given to the process of encoding data such that it uses lesser number of bits as compared to the original representation.
196 questions
3
votes
2
answers
369
views
A simple method for compressing white space in text (Java) - Take II
Intro
In this post, I will elaborate on A simple method for compressing white space in text (Java). Here, I have incorporated some advice offered by Chris. Also, this version preserves a single new ...
4
votes
1
answer
489
views
A simple method for compressing white space in text (Java)
(The story continues in A simple method for compressing white space in text (Java) - Take II.)
Intro
Now I have that text space compressor. For example,
...
2
votes
1
answer
123
views
ShannonFanoEncoder.java - computing prefix codes in Java
Intro
This time, I have implemented the Shannon-Fano coding.
Code
io.github.coderodde.compression.ShannonFanoEncoder.java
...
2
votes
1
answer
94
views
Range coder with simple adaptive frequency model
Range coder implementation provided here is not the same as the traditional arithmetic coder covered by historical patents. Range coding was developed as a patent-free alternative to arithmetic coding....
2
votes
1
answer
143
views
Simple zip lib like experiment
Code review would be appreciated.
Nothing heroic. Very trivial implementation of Adaptive Huffman Coding, LZ77 compression and deflate coding by the book:
https://github.com/leok7v/sqz
Reason for ...
2
votes
2
answers
292
views
Byte Pair Encoding Compression in C89
This is a small project to implement Philip Gage's Byte Pair Encoding compression for the purpose of learning C. In particular, it's written in C89 for fun as that's what would've been contemporary (...
2
votes
2
answers
222
views
Checking file header for magic number in Python
I wrote this to check files for successful compression with LZ4.
Any advice is welcome.
Particularly regarding raising exceptions and error handling.
...
1
vote
1
answer
151
views
Looking for help simplifying a general purpose compression function
The following is a general purpose file compression function with the following features:
It can take either a single file or directory as the source input
It defaults to the source directory when to ...
0
votes
1
answer
123
views
Comparing video recording algorithms in Java: no-compression vs. naive diff compressor
Usage of the program is in Facebook.
Intro
In this JavaFX program, a user is presented with a white canvas with a black circle at the center of the canvas. Then, the user has 10 seconds to record a ...
5
votes
1
answer
327
views
Most compact data format for a shopping cart
I'm trying to build a format that can represent the user's cart on my website in the most compact way. The website is related to computer parts and there are 23 product categories. Each product has an ...
3
votes
2
answers
1k
views
Huffman Coding implementation in C++
Here is an implementation of compression with Huffman coding. It works well by my testing. It compresses a 1 GB string in about 30 seconds, and decompresses in about 15 seconds with VisualStudio 2022 &...
1
vote
1
answer
108
views
Optimal Jelly string compressor in Rust
I'm writing some small programs to practice Rust, and this one's a string compressor for the golfing language Jelly (unofficial spec). It involves some non-ASCII stuff and bigints (from the ...
4
votes
1
answer
336
views
Python script for zlib decompression
I'm looking for feedback/improvement on code that I wrote. It's a function that scans a file for zlib headers and returns the header, offset, and decompressed data. In main, below the function, I use ...
6
votes
2
answers
1k
views
Huffman coding, using vector<bool>
This is my draft implementation of Huffman encoding & decoding. I'd appreciate any feedback, but have a couple specific questions:
I wrote the code assuming vector represents each bool with a ...
3
votes
1
answer
643
views
Huffman coding implementation in java
I wrote a simple huffman coding algorithm for learning and practice. I just used the technique given on the wikipedia page.
Could you tell me my missing points and mistakes?
Node.java
...