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
14
votes
2 answers

Which algorithm is used in standard ZIP?

I have googled, wikied and read the RFC of ZIP, but can't find any info about the exact algorithm which is used in ZIP. I have found info about ZIP == TAR + GZIP But, I'm confused by this info. Since GZIP uses LZW algorithm as I remember, and TAR…
user1131997
13
votes
2 answers

Lossless compression method to shorten string before base64 encoding to make it shorter?

just built a small webapp for previewing HTML-documents that generates URL:s containing the HTML (and all inline CSS and Javascript) in base64 encoded data. Problem is, the URL:s quickly get kinda long. What is the "de facto" standard way…
bennedich
  • 12,150
  • 6
  • 33
  • 41
13
votes
4 answers

Can PHP decompress a taz file? (.tar.Z)

I have tried to use Zlib to decompress the file, but it just said "Data error" and gave me an empty file. This is the code I tried: // Open a new temp file to write new file to $tempFile = fopen("tempFile", "w"); // Make sure tempFile is…
UndoingTech
  • 709
  • 3
  • 16
10
votes
5 answers

Parsing GIF Raster Data - LZW

I've been trying to decompress GIF's in PHP and seem to have everything except the LZW decompression down. I have saved an image that is shown: This image is 3 x 5 like this: Blue Black Black Black Blue Black Black Black Black White White…
teynon
  • 7,540
  • 10
  • 63
  • 106
8
votes
8 answers

LZW compression/decompression under low memory conditions

Can anybody give pointers how I can implement lzw compression/decompression in low memory conditions (< 2k). is that possible?
Manas
  • 589
  • 8
  • 18
8
votes
2 answers

PHP LZW Binary Decompression Function

I've been looking on the internets and couldn't find an LZW decompression implementation in PHP that works with the data outputted by these javascript functions: function lzw_encode(s) { var dict = {}; var data = (s + "").split(""); var…
xd44
  • 831
  • 3
  • 9
  • 15
7
votes
2 answers

Unclarity about usage of LZ functions

Note: this question is about the Windows LZ functions, which are File Management Functions beginning with the prefix LZ: LZOpenFile, LZCopy, LZClose, etc. If Google isn't wrong, these are probably among the most poorly documented functions of the…
GOTO 0
  • 42,323
  • 22
  • 125
  • 158
7
votes
2 answers

LZW decompression algorithm

I'm writing a program for an assignment which has to implement LZW compression/decompression. I'm using the following algorithms for this: -compression w = NIL; while ( read a character k ) { if wk exists in the dictionary …
clintbeastwood
  • 73
  • 1
  • 1
  • 3
6
votes
4 answers

How can I do LZW decoding in Java?

I have a database which contains picture data stored as a binary blob. The documentation says the data is encoded using LZW. I thought that I could decode it using the Zip or GZip input streams found in the Java library, but it didn't work - I got…
Andrei Vajna II
  • 4,642
  • 5
  • 35
  • 38
5
votes
1 answer

What if Dictionary size in LZW algorithm is full?

I have been studying LZW compression and there is one thing that I can't satisfy myself with which is that while building up the dictionary in LZW mostly its maximum limit is set to 4096 entries. Why is that ?. Also if dictionary gets full then the…
Syed Ahmed Jamil
  • 1,881
  • 3
  • 18
  • 34
4
votes
1 answer

Basic lzw compression help in python

I'm just trying to write a really basic script that'll take some input text and compress it with lzw, using this package: http://packages.python.org/lzw/ I've never tried any encoding with python before and am thoroughly confused =( - I also can't…
sophanox
  • 39
  • 1
  • 1
  • 3
4
votes
1 answer

LZW compression algorithm implementation

I have been reading dictionary based compression algorithms including LZW and LZSS. Then, I wanted to implement LZW using Java and started working on it. I am not a developer and so I suspect my implementation may not be efficient. Can you look at…
birraa
  • 430
  • 1
  • 4
  • 15
4
votes
4 answers

ArrayList vs String in Java

I am implementing the LZW algorithm. I have implemented it for strings and text files successfully and am currently modifying my code to work with binary files, such as images or executables (since I cannot read these files as strings). I have…
Danny Rancher
  • 1,923
  • 3
  • 24
  • 43
4
votes
1 answer

loop rolling algorithm

I have come up with the term loop rolling myself with the hope that it does not overlap with an existing term. Basically I'm trying to come up with an algorithm to find loops in a printed text. Some examples from simple to…
none
  • 11,793
  • 9
  • 51
  • 87
4
votes
4 answers

Is there a trick to creating an animated gif of tv static that will allow it to be relatively small?

Apologies in advance, but this isn't really a photoshop question. Rather, I'm trying to come up with something that is convincing but exploits the compression and features of the gif format as best as possible to produce the smallest possible file…
John O
  • 4,863
  • 8
  • 45
  • 78
1
2 3
12 13