Questions tagged [lzw]

LZW (Lempel-Ziv-Welch) is a compression algorithm which supersedes LZ78.

LZW (Lempel-Ziv-Welch) is a compression algorithm which supersedes LZ78.

You can find more information about LZW on Wikipedia.

185 questions
0
votes
1 answer

TIFF compression using LZW

Is there a class in C# library which does LZW compression on TIFF images. I know there is a compression scheme inviolving LZW being present, but using that doesnt decrease the file size whatsoever. Is there any thing that Im assuming wrong? Please…
harsha217
  • 72
  • 1
  • 11
0
votes
4 answers

How to Detect a String is Compressed by LZW Algorithm in C++

I have two xml files, one is compressed by LZW, other is in plain text. How can I know whether is compressed or not?
Nick
  • 324
  • 4
  • 14
0
votes
1 answer

LZW - Compression rate

Well, I have to make a PPM image compressor using the LZW algorithm, the algorithm and the code I understand and have implemented a version for strings (in Java,for tests). The big problem is in compression, because if I have: Input: …
0
votes
1 answer

LZW compression doesn't seem to work correctly

I am trying to get this code work work properly, but when I try to encode things it doesn't seem to work as it should. I have a text file thats 60bytes. I encode it and the outputted file is 100 bytes. When I decode that file it goes to like…
Ayohaych
  • 5,099
  • 7
  • 29
  • 51
0
votes
1 answer

Need help on implementing LZW on a ASCII text file

i'm trying to implement an LZW to compress an ASCII based text file and i need help. Let's say i have a text file with a "BABAABAAAA" written on it, and i use my code to compress it using LZW algorithm. The output of the result will be written on a…
0
votes
1 answer

Golang: can't decompress data with lzw package

I'm trying to create compressed string pool with Go. This is my code - http://play.golang.org/p/T5usLfU0fA I can't decompress what have bin compressed with compress/lzw package. The input to the lzw.Writer is [104 101 108 108 111 32 119 111 114 108…
Evgeny Lazin
  • 9,193
  • 6
  • 47
  • 83
0
votes
2 answers

Pattern finding LZW python

LZW algorithm is used to find patterns between input symbols. But can it seek pattern among words ? I mean the alfabet index not to be symbols but words for example for the input : 'abcd', 'abcd', 'fasf' , 'asda', 'abcd' , 'fasf' ... to have an…
bill
  • 728
  • 3
  • 6
  • 15
0
votes
1 answer

Software that apply LZ77 and LZW dictionary based compression algorithm

Are there good applications (software) that perform dictionary based compression algorithm (LZ77 and LZW). And it is better if the application show: Compression ratio, Compression and decompression Time. I want to apply the compression in the text…
user3184352
  • 121
  • 7
0
votes
3 answers

Compressing large files using blocks in Java

I am compressing files of over 2GB in Java using a consecutive application of two compression algorithms; one LZ based and one Huffman-based. (This is similar to DEFLATE). Since 2GB is too large to be held in any buffer, I have to pass the file…
Danny Rancher
  • 1,923
  • 3
  • 24
  • 43
0
votes
2 answers

Java LZW Compress working very slowly 20 seconds for 3MB

Here is my code: public static String compress(final String input) { HashMap codes = new HashMap(); for (int i = 0; i < 256; i++) { codes.put((char) i + "", i); } StringBuilder outputString = new…
Danny Rancher
  • 1,923
  • 3
  • 24
  • 43
0
votes
2 answers

Copy String contents to a byte array (LZW encoding technique)

I am trying to implement LZW compression and decompression technique. My program takes any file as an InputStream and reads it into a byte array. It then applies the compression algorithm to it and the encoded bytes are returned in a string …
Pramit
  • 33
  • 1
  • 7
0
votes
1 answer

How to assign only 16 bits to any integer in a binary file instead of the normal 32 in C++?

I have a program to create a compressed file using LZW algorithm and employing hash tables. My compressed file currently contains integers corresponding to the index of hashtable. The maximum integer in this compressed file is around 46000, which…
Anuj Kumar
  • 130
  • 1
  • 9
0
votes
1 answer

Compressing ZIP file using a LZW compresion creates a too large size compressed file

I tried to compress zip file using a LZW compression method(code provided in following link), http://rosettacode.org/wiki/LZW_compression#C It creates encoded file length as too long than original file size, what is the reason for that? please…
0
votes
1 answer

Saving LZW encoded data into a mySQL database

I send zipped data, which is done with LZW compression at the client side with js, to server. The problem is that the data becomes corrupted after saving it to database with SQL. So my question is, what collation should i use, to accomplish that?…
A.B.
  • 2,374
  • 3
  • 24
  • 40
0
votes
1 answer

LZW Encoder Decoder - Symbol Table

My LZW Compression works when I use a symbol table(dictionary) of length 256, Encoder and Decoder both work with 256 and everything works fine but when I increase this number for example to 512, 1024, 4096 the decoded file output is not the same…
Anarkie
  • 657
  • 3
  • 19
  • 46