Skip to main content

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.

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 ...
coderodde's user avatar
  • 32k
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, ...
coderodde's user avatar
  • 32k
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 ...
coderodde's user avatar
  • 32k
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....
Leo's user avatar
  • 249
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 ...
Leo's user avatar
  • 249
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 (...
qwr's user avatar
  • 1,233
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. ...
voices's user avatar
  • 767
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 ...
Christian Fitzner's user avatar
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 ...
coderodde's user avatar
  • 32k
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 ...
Raees Iqbal's user avatar
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 &...
Aykhan Hagverdili's user avatar
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 ...
rydwolf's user avatar
  • 151
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 ...
792f8NFF's user avatar
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 ...
Uri Raz's user avatar
  • 213
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 ...
gedofgont's user avatar

15 30 50 per page
1
2 3 4 5
14