The name given to the process of encoding data such that it uses lesser number of bits as compared to the original representation.

learn more… | top users | synonyms (1)

1
vote
0answers
46 views

Optimizing BZ2 decompression code for big data set

I have the following fully working code that: Walks through all sub-folders in a given directory; Captures dirpath and filename for the compressed file (i.e., Dir/*.json.bz2); Creates a decompressed ...
5
votes
1answer
70 views

Rijndael compression/encryption class

Out of personal interest and as a learning exercise I've written a C# class (.NET 4) to perform encryption/decryption of a file along with some compression upon encryption. Most of my understanding of ...
2
votes
0answers
30 views

Matlab compressing image with SVD

I'm new to both linear algebra and matlab and need help with this code. The code is currently working, if I run with e.g sigma_threshold = 10, I get a blurry picture, if I set it to 100 it's even more ...
-3
votes
1answer
46 views

Huffman tree node

I've implemented a Huffman tree for one of my academic coursework. For each of the nodes in the tree, there will be a left child, right child, and a parent. For each ...
5
votes
0answers
38 views

CGI output gzip compression module

I'm mainly concerned about readability and things I don't seem to be aware of. If the code is readable, I won't need to explain it. ...
4
votes
2answers
49 views

Perform basic string compression using the counts of repeated characters

I managed to implement this question from Cracking the Coding Interview: Implement a method to perform basic string compression using the counts of repeated characters. For example, the string <...
4
votes
1answer
430 views

Improving gzip function for huge files

I have created a python system that runs Linux core files through the crash debugger with some python extensions. This all works fine but one bit of is problematic. These files are send to the ...
2
votes
1answer
48 views

Compression unit test data “easy case”

In another post I created a piece of data, which make compressor annoyed. Create 'worst case test' data for compression test Now I am trying to make it happy. I generate another data set, ...
8
votes
2answers
113 views

Create 'worst case test' data for compression test

I am going to prepare some test data for a compression test. One of the them is the 'worst case test', which should make the compressor work worst. Use random number to generate such a file is an ...
4
votes
1answer
53 views

LZ-77 text compression algorithm

This is my version of a LZ-77 lossless compression algorithm for text. It maintains a sliding window of 4095 characters and can pick up patterns up to 15 characters long. Basically, the compressed ...
6
votes
1answer
70 views

Huffman encoding implementation for Unicode

I'm looking for a general review with emphasis on idiomaticness and error handling. ...
3
votes
0answers
61 views

Sparse matrix compressed sparse row (CSR) in Python 2.7

Brief introduction for CSR: The compressed sparse row (CSR) or compressed row storage (CRS) format represents a matrix M by three (one-dimensional) arrays, that respectively contain nonzero ...
4
votes
2answers
116 views

Huffman compressor in C++

I have this Huffman compressor that can compress both text and binary files by treating each as binary files. (By the way, it is fully compatible with this Java implementation.) See what I have: Code ...
0
votes
1answer
99 views

Huffman compressor in Java - follow-up

This post improves upon my Java implementation of the Huffman algorithm for data compression. I did the following improvements: The map mapping each byte value to its frequency does not rely on <...
3
votes
2answers
88 views

Compress an array of strings in Android

I'm compressing an array of strings in an Android app. Is there something you would suggest? ...
4
votes
2answers
78 views

ConcurrentDictionary, Store Key and Compression

So i have a ConcurrentDictionary<int, string> The "int" is merely the way i store the key, which i want more recommendations on. Currently i do like this. ...
7
votes
2answers
467 views

Huffman compressor in Java

(See the next iteration as well.) I have this Java program that can en-/decode files, both text and binary. What comes to critique I want to hear anything regarding these points: Performance, ...
1
vote
1answer
60 views

Zip file using yauzal lib

I'm using the following code to unzip file which is working OK. I'm getting file with the request (express) and unzip it in specified folder ...
1
vote
0answers
90 views

Huffman code generator in Typescript

Write a program that takes any input text and produces both a frequency table and the corresponding Huffman code. Take approximately 360 words from any English document as your input text. ...
3
votes
1answer
85 views

Compressing time series by removing repeated samples

I work on a project with time series data. So there are samples (\$y\$), and each sample has a timestamp (\$x\$). The data will be visualized, but often there are time series which contain samples ...
4
votes
1answer
39 views

Python date compression

I m making a script to store date information in the smallest size in bits (I don't mind of the actually memory use in the program / runtime) ...
2
votes
1answer
2k views

Compress and decompress a string from a file

This is a task for a computing controlled assessment. I'm wondering if it could be made more efficient. The only things I could think of would be the 'import re' and turning the filename input and ...
1
vote
2answers
933 views

Simple string compression in Python

This is my solution to exercise 1.6 in Cracking the Coding Interview. I am interested in receiving feedback on the coding style and time/space complexity. The exercise statement is: Implement a ...
3
votes
0answers
129 views

zlib wrapper class

I needed to write zlib wrapper class for my application, so I can change it with different algorithm later if I want to do so. Here is the simple version: ...
3
votes
2answers
142 views

Analyzer for compression algorithms (or tools)

This file contains the main functions of my tool, rac. In particular, I care a lot about the Shannon function. Would you please give some hints to make the file cleaner? I have a perversion for ...
5
votes
1answer
59 views

Prefix free compression and decompression

I have written a prefix-free compressor that assigns the shortest bit-strings to the most common characters. It works very well for natural language as some characters (SPACE, "a", "e" ...) are much ...
3
votes
1answer
171 views

DotNetZip: Adding files to archive faster in web app

I'm looking for ways to speed up the process of adding entries to a zip-archive, in a web app, using DotNetZip. The problem currently is that the response times out before all files has been added to ...
7
votes
1answer
133 views

Multithreaded Decompression

I'm working on optimizing a class for decompressing Mass Effect 3's .sfar files. .sfar files are archives, and this function decompresses a file from inside an .sfar and writes it to the provided ...
1
vote
1answer
78 views

Encoding and decoding in Haskell — 99 Problems exercise 13, 14

I've been working on these solutions to the Haskell 99 questions, encoding and decoding series for a while now, so I figured I ought to present them to see how I screwed up the implementation. ...
1
vote
0answers
77 views

Cuda C Matrix Compression

I am using Cuda to learn and implement a CSR matrix compression algorithm. What can I do better relating to C's best practices? main.c: ...
6
votes
1answer
146 views

Speeding up process time while archiving files

I asked this question on Stackoverflow, and was told I might have better luck here. I'm new to c# and have created a basic file archiver. It works, and it does what it's suppose to do, but I think it'...
13
votes
2answers
276 views

Python 3 decompression routine 10x slower than C# equivalent

I'm relatively new to Python 3, especially IO programming, writing a Blender add-on to import model data. The model data is available in a custom compression, and I originally wrote code in C# to ...
0
votes
1answer
60 views

Condense JSON for bandwidth efficiency

JSON is quickly becoming the formatting standard of choice for quick, convenient, and reliable machine to machine communications. It is flexible and widely supported but it has some drawbacks when it ...
-4
votes
2answers
168 views

RAM overhead on a compression program [closed]

In a program, the one below is attempting to codify into a translation of another file. The output is severely condensed. It works, and once I get it to decompress, then it will win award after award. ...
3
votes
1answer
233 views

Huffman algorithm implementation in C++

Lately, I have been working on this Huffman algorithm and it is finally done, though I think it is improvable due to the fact that people say you have got to use two priority queues but I ended up ...
0
votes
1answer
187 views

Compressing a file using zip or gzip

Write a Compress class defines two static methods, gzipFile(), which compresses a file using GZIP compression format, and zipDirectory(), which compresses the files (but not directories) in a ...
1
vote
1answer
3k views

Simplifying LZW compression & decompression

I have wrote code that takes an input file text that can be compressed, and should contain ascii values, and then a new file is created with an appended ".lzw" and that file can then be decompressed. ...
2
votes
1answer
69 views

Custom compression tool

I have made my own compression tool for a stack-based language that uses a dictionary compression method. The code for the decompression is the following: ...
2
votes
0answers
34 views

Adding information to a compressed file and compressing the output

I wrote this script for adding information to a compressed file and compressing the output: ...
5
votes
1answer
73 views

Uncompress archive, check contents, add missing files, recompress archive

The code looks for the specified .tgz file, if it's not present, it creates it. It looks for files ending in .txt in the cwd and adds them to a list. It decompresses the gzip, checks for the .txt ...
4
votes
1answer
86 views

SICP - exercise 2.69 - generate a huffman tree from a set of ordered leaves

From SICP Exercise 2.69: The following procedure takes as its argument a list of symbol-frequency pairs (where no symbol appears in more than one pair) and generates a Huffman encoding tree ...
2
votes
1answer
80 views

RLE-like string compression in clojure

There have been already many similar questions to this one (e.g. this and this, just to point two), but I did not find any for clojure. The goal is to compress a string in a RLE-like way: i.e. each ...
3
votes
2answers
2k views

Extracting RAR files in a directory

I just started programming, and something is telling me that this working function looks to big for what it does. Can you give a better version of the code so I can understand how to code faster, ...
1
vote
1answer
175 views

String compression implementation in C

I implemented basic string compression algorithm that uses the counts of repeated characters. For example: the string aabcccccaaa would become a2b1c5a3. What do you think about this, is there a better ...
1
vote
2answers
68 views

Simple compression on steroids - now with decompression

A third follow up to the simple compression implementation. Adopted most of @holroy's suggestions. Main changes: Compression now uses high-bit to indicate that additional length bytes are still ...
8
votes
2answers
217 views

Simple compression reloaded++

As a follow up to my previous question I've improved the code + algorithm. The compression now works the following way: Each character is followed by a length byte. The top 3 bits of that byte denote ...
4
votes
2answers
78 views

Simple string compression reloaded

Inspired by this question I thought I provide my implementation. I tried to go with the spirit of the *nix tool chain - read from stdin and write to stdout. This has the added benefit of making ...
11
votes
4answers
2k views

Algorithm for simple string compression

I attempted a problem from the Cracking the Coding Interview book. The following input: aabcccaaa should give the following output: ...
12
votes
1answer
1k views

C++11 implementation of Huffman-encoding

This is a c++11 implementation of Huffman-encoding that I wrote as a hobby. My main goal in writing it was to get more accustomed to c++11 and STL in general, as well as stuff like bit-manipulation. ...
2
votes
1answer
55 views