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.
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…
גלעד ברקן
  • 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…
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…
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…
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…
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,…
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…
1
vote
3 answers

TEXT compression in python

I have this text…
Quixotic
  • 2,346
  • 5
  • 32
  • 57
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…
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)
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…
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…
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…
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 :…
1
2