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

How do I get the byte array of the a gif image without PIL?

im trying to get a byte array, such as 47 49 46 38 39 61 0A 00 0A 00 91 00 00 FF FF FF FF 00 00 00 00 FF 00 00 00 21 F9 04 00 00 00 00 00 2C 00 00 00 00 0A 00 0A 00 00 02 16 8C 2D 99 87 2A 1C DC 33 A0 02 75 EC 95 FA A8 DE 60 8C 04 91 4C 01 00…
jeff
  • 1
0
votes
0 answers

openmp for LZW data compression using c++

Am trying to parallelize the compression process using OpenMP. Currently trying to parallelize it while all threads uses the same dictionary. But error seems to occur when trying to add new contents to dictionary. Any suggestions on how to to…
Dababy
  • 3
  • 3
0
votes
1 answer

input/output lzw issue

Sup dudes, I need your help on something. I'm writing a lzw compressor in C, and I'm having a spot o trouble with encode and decode. Here is what I have so far: fixed it, thanks. $> ./encode < input.txt code 1 code 2 code 3 code 4 code 1 $>…
needzhelp
  • 1
  • 1
0
votes
1 answer

LZW for fractional values and other data values

There are many examples provided over the internet for encoding strings using LZW however how this algorithm encode fractional values? Do we consider every input to the LZW as string i.e. suppose I have an array of fractional values: for example…
0
votes
1 answer

LZW decompression problem after Clear Code (Unix Compress .Z-files)

I am implementing my own decompression code for decompressing Unix COMPRESS'ed .Z files. I have the basic decompression working and tested on smaller example files, but when I test it out on "real" files which may include the so called "Clear Code"…
Matheos
  • 207
  • 2
  • 12
0
votes
1 answer

What does the parameter assigned to an unordered_map<> name hold?

I was going through a great article on LZW compression algorithm by Mark Nelson, and found something in the code I haven't yet encountered. In the code, he used unordered_map to store strings and their corresponding frequency. The declaration of the…
mandybuot
  • 15
  • 5
0
votes
2 answers

Decompress .Z files (LZW Compression) in C#

I am looking to implement the Rosetta Code LZSW Decompression method in C# and I need some help. The original code is available here: http://rosettacode.org/wiki/LZW_compression#C.23 I am only focusing on the Decompress method as I "simply" (if…
Matheos
  • 207
  • 2
  • 12
0
votes
1 answer

Tiff Output is not as expected for Black and white 1200dpi LZW test file created using Universal Document Converter 6.7 & 6.8 versions

Respected Sir/Madam, I have a doubt regarding LZW BW 1200dpi tiff file creation using “UDC driver 6.7/6.8 version”. If we disable “'Perform High-Quality Smoothing”, then output data are not visible in output files. If we enable this option, it is…
Shant
  • 11
  • 5
0
votes
1 answer

My LZW compression program barely compresses

I'm taking an algorithms class where we have to implement LZW compression in Java. I decided to use a Trie data structure for this, and I've already implemented the Trie and got it working, but is very slow, and it barely compresses. We are supposed…
vimdiesel
  • 15
  • 1
  • 3
0
votes
1 answer

Javascript LZ String compression check if string is already compressed

I am using the LZ String library https://github.com/pieroxy/lz-string/ to compress/decompress strings and save them in localStorage. Since the compression is going to be applied on an existing project having customers with uncompressed strings…
Crash Override
  • 411
  • 6
  • 17
0
votes
1 answer

Last symbol is duplicated in LZW

I tried implementing LZW encoding/decoding and ended up with the following code #include #include #include #include #include #include using Index = std::int16_t; void…
Yamahari
  • 1,926
  • 9
  • 25
0
votes
1 answer

C# LZW Compression and Decompression

I have looked at the SharpZipLib library, but i do not know how i would use the LZW in that library. For example i have a List of bits, which i want to compress. Lets say List bits contains the following elements…
qlabfgerkaSmurf
  • 347
  • 1
  • 5
  • 20
0
votes
1 answer

Converting Uncompressed TIF file to a TIF file with compression LZW and ZIP

I used RawTherapee Application in Ubuntu OS to convert RAW file to TIF. After that, converted that Uncompressed TIF file using ImageMagick with compressions types LZW and ZIP. Then, used ExIFTool to get the compression name. LZW shows correctly but…
0
votes
2 answers

Difficulty understanding decompression with LZW algorithm

I compressed the following message: "ababcbababaaaaaaa" using LZW compression algorithm. With a=1;b=2;c=3 i get the following message : "1 2 4 3 5 8 1 10 11 1", which matches the result my professor got in our exercise notes. However, when i try…
user569685
  • 191
  • 1
  • 13
0
votes
0 answers

Store output codes of LZW algorithm

WYS*WYGWYS*WYSWYSG When compressed above string using LZW algorithm it gave an output codes as below. 87 89 83 42 256 71 256 258 262 262 71 So you can see size of output codes bigger than that of the string.now I need to know How should I store it…
user7185
  • 3
  • 4