The name given to the process of encoding data such that it uses lesser number of bits as compared to the original representation.
6
votes
3answers
561 views
String compression implementation in C#
I wrote a method that reduces a string like aabcccccaaa to a2b1c5a3
My implementation:
...
7
votes
1answer
86 views
Lossy packing 32 bit integer to 16 bit
I am working on the lossy 16 bit representation for 32 bit integers that catches all 32 bit range with precision depending on absolute value.
My idea is to store integer ...
2
votes
1answer
71 views
Run length encoding of vectors in MATLAB: looped version and vectorized version
A project I'm working on requires something akin to run length encoding on a vector in matlab. The data is in the form of a numeric vector, and the output is in the form of two vectors, ...
7
votes
4answers
121 views
Simple compression algorithm
An implementation of a simple compression algorithm that's featured in a programming practice book.
My goals:
Robust: All error conditions must be handled properly. The specification indicated in ...
3
votes
1answer
27 views
Bit compressing in JavaScript
I have an bit array var data = []; ... and I have the following function:
jsPerf
...
4
votes
2answers
87 views
Improving performances processing compressed csv files
I have some csv files compressed in .bz2 format. I need to take a subset of the records (and data) and switch to .gz.
I am not ...
5
votes
3answers
146 views
C++ demo code for interaction with C
I want to show how to interact with C from C++ and chose a simple and small library to demonstrate. zlib's gzopen, gzwrite and ...
0
votes
2answers
80 views
Increase efficiency of basic string compressor
I was wondering what I can do to increase the performance of this program. The algorithm is pretty slow right now but I was wondering what I can do to increase the efficiency of this program. I used ...
2
votes
1answer
48 views
Which one of these both run-length decoding algorithm is the most optimal?
I'm working on Ocaml.org 99 problems, and I solved the run-length decode one.
Here is the solution given by the site:
...
6
votes
3answers
5k views
3
votes
1answer
97 views
htaccess for URL remapping, caching, and compression
I have been collecting snippets from all over the place and then put them all together creating the following .htaccess file.
I really don't understand if what I have done below is good/should work ...
0
votes
2answers
1k views
Run-length encoding using C
Recently I was asked in an interview to convert the string say "aabbbccccddddd" to "a2b3c4d5". i.e we have to avoid repeating same character and just adding the repeat count. Here 'a' is repeated ...
2
votes
1answer
986 views
JPEG compression and DCT algorithm verification
Here is the code I am using to apply DCT on 8x8 blocks, which I'm not sure is correct. I have tried to follow Wikipedia's discrete cosine transformation (DCT) formula as closely as possible. Please ...
2
votes
2answers
248 views
LZW Compression In Lua [closed]
I would like a function for LZW data compression in the Lua programming language.
Here is the pseudocode -
...
1
vote
1answer
135 views
How is this method for compressing (zipping) files?
I'm writing a Java Helper Library. I want to include a method to zip files together, and this is what I've come up with.
I'm using the java.util.zip.* library (ZipOutputStream and ZipEntry ...
4
votes
1answer
3k views
Is there a faster way to read a .gz file in Python?
I am using Python 2.6.5. I am a newb and am trying to find the fastest way to print out the contents of a .gz file. It's my understanding that prior to v2.5, zcat was much faster than gzip (see ...
2
votes
1answer
282 views
GZip archiver for log files
It compiles, works well, solves my problem of zipping old or big log files and removes them from a hard drive. However, following this answer, I would like to know what was wrong with the code.
...
5
votes
2answers
1k views
Slow web-scraping geolocator
How do I make my Python program faster?
I have 3 suspects right now for it being so slow:
Maybe my computer is just slow
Maybe my Internet is too slow (sometimes my program has to download the html ...
6
votes
1answer
780 views
Optimizing Huffman Decoding
I've been working on implementing a fast Huffman decoder for video decoding. With some help from you, I have been able to produce a decent implementation. However I am still not satisfied with the ...
10
votes
3answers
2k views
Faster huffman decoding?
I've been trying to implement a fast huffman decoder in order to encode/decode video.
However, I'm barely able to decode a 1080p50 video using me decoder. On the other hand there are lots of codecs ...
2
votes
1answer
566 views
Huffman encoding successive-merge function
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 ...