Questions tagged [text-compression]
26 questions
31
votes
3 answers
What is the current state of text-only compression algorithms?
In honor of the Hutter Prize,
what are the top algorithms (and a quick description of each) for text compression?
Note: The intent of this question is to get a description of compression algorithms, not of compression programs.
![](../../users/profiles/3153.webp)
Brian R. Bondy
- 314,085
- 114
- 576
- 619
6
votes
1 answer
Haskell Linear-Time Online Algorithm
Please forgive me if I misused the big words in the title; I'm not too knowledgeable about them but hope they describe my problem. I wrote an elaborate scheme to try and encode strings according to these requirements. For strings of length 10^4 and…
![](../../users/profiles/2034787.webp)
גלעד ברקן
- 21,095
- 3
- 19
- 57
5
votes
4 answers
What's the best practice for storing huge amounts of text (into a DB or as a file?), and what about compressing it?
I'm building a web-app that handles internal emails and other frequent small-to-medium sized chunks of text between users and clients. What's the best method for storing this data? In a database (MySQL) or as thousands of individual files? What…
![](../../users/profiles/26278.webp)
Seth
- 1,550
- 3
- 15
- 20
5
votes
1 answer
What is the name of this text compression scheme?
A couple years ago I read about a very lightweight text compression algorithm, and now I can't find a reference or remember its name.
It used the difference between each successive pair of characters. Since, for example, a lowercase letter predicts…
![](../../users/profiles/153285.webp)
Potatoswatter
- 126,977
- 21
- 238
- 404
2
votes
3 answers
Text Compression Algorithm
I am just wondering if someone could introduce me any algorithm that compresses Unicode text to 10-20 percent of its original size ?
actually I've read Lempel-Ziv compression algorithm which reduces size of text to 60% of original size, but I've…
![](../../users/profiles/1551608.webp)
Bahram
- 1,152
- 2
- 16
- 34
2
votes
3 answers
Compressing a string, end result without line breaks?
I'm trying to compress any given string to a shorter version, copy paste-able compressed string that doesn't contain any line breaks.
I tried gzcompress, but then copy/pasting the result into a different php script and trying to gzuncompress throws…
![](../../users/profiles/78949.webp)
Andrei Serdeliuc ॐ
- 5,590
- 5
- 37
- 64
2
votes
2 answers
Compressing small piece of data
I have a buffer of let's say 4KB, containing data in JSON-like format. I need to add significantly more information (up to let's say 3x more) to it, but I have to fit in this small chunk of memory. I was thinking about using libZ to compress text,…
![](../../users/profiles/785454.webp)
k_wisniewski
- 2,219
- 3
- 20
- 28
1
vote
0 answers
How to get the same byte Array after stored it as String?
I have used Java code to compress a string to a byte array and then I store this byte array as a string in Cloud database. The decrypted message needs the same byte array which was returned by the compress method. So how to get the same byte array…
![](../../users/profiles/10884670.webp)
Shuvendu Dhal
- 55
- 1
- 6
1
vote
3 answers
1
vote
5 answers
How come, different text files become different sizes after compression?
I have file of some random text size = 27 gb and after compression it becomes 40 mb or so.
And a 3.5 GB sql file become 45 Mb after compression.
But a 109 mb text file become 72 mb after compression so what can be wrong with it.
Why so less…
![](../../users/profiles/349297.webp)
Arshdeep
- 4,081
- 7
- 29
- 43
1
vote
2 answers
LZW compression on text
How can the LZW output sequence be improved to achieve higher compression? Are there any specific methods? (I am applying LZW compression on a text file)
![](../../users/profiles/4345738.webp)
user4345738
- 181
- 8
1
vote
1 answer
Best compression and decompression algorithm for qrcode
Scenario: Have to generate qr code which contains some customer information. It will be scanned in android phone.
The information have to transfer in following process.
----------------------Server side---------|| Image…
![](../../users/profiles/3600674.webp)
Amir john
- 940
- 1
- 10
- 24
0
votes
1 answer
Issues with a Reference Code for Running Canonical Huffman Code on Java
I am running the Java program shown here to generate canonical Huffman codes, https://www.geeksforgeeks.org/canonical-huffman-coding/
Although the code gives the correct canonical Huffman codes with the shown input, for other cases I don't find the…
![](../../users/profiles/4959667.webp)
beginner
- 281
- 2
- 13
0
votes
0 answers
compress the text text file full of integer[python]
My python code generates a list of list of integers like this [[1, 311 ,8], [5, 3, 23]]. however it has thousands of hundreds of integer and i have to run the code a hundred times. I have to store these results.
I keep them in a file where each list…
![](../../users/profiles/6246686.webp)
Mohsen Fazaeli
- 37
- 9
0
votes
2 answers
Blazor / ASP.NET Text Compression - Google speed test do not agree, why?
I have a blazor application where I added text compression, that way:
context.Services.AddResponseCompression(o =>
{
o.EnableForHttps = true;
});
// We use Brotli by default :…
![](../../users/profiles/5581989.webp)
ClubberLang
- 1,053
- 1
- 9
- 26