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
0 answers

Split a compressed blob (LZW algorithm) in Python

A better version of my last question : I have blob data stored using LZW algorithm in oracle data base which I have to extract using Python and store in MS SQL Data warehouse. The algorithm works fine for smaller documents but it fails for larger…
Doodle
  • 481
  • 2
  • 7
  • 20
0
votes
0 answers

python-lzw doesn't decompress larger blobs

I am new to python and we had been trying to use lzw code from GIT in the program. https://github.com/joeatwork/python-lzw/blob/master/lzw/init.py This is working well if we have a smaller blob but if the blob size increases it doesn't decompress…
Doodle
  • 481
  • 2
  • 7
  • 20
0
votes
2 answers

Huffman compression

I'm currently studying different compression algorithms such as huffman, adaptive huffman and Lempel Ziv algorithms but I don't really understand how it should work on a random file. So I know that they work on text file, but is it the only thing…
0
votes
0 answers

TIFF compression

I am trying to compress some TIFF files. These are in a certain map structure, and so they should stay. With the code bellow, I am able to convert every first file (named 1.tiff) in every subdirectory, but it gives me a System.ArgumentException when…
0
votes
0 answers

Dictionary flush in LZW algorithm

I have compressor/decompressor for LZW. Now i want to use custom variable(size) to keep dictionary size in bytes and then it becomes large enough i revert dictionary to initial state and start fill it again. But i dont realize how to implement it. I…
Ivnsky
  • 3
  • 1
0
votes
1 answer

LZW Compression

The LZW compression algorithm is increasing the size in bits after compression: Here is the code for Compression function: // compression void compress(FILE *inputFile, FILE *outputFile) { int prefix; int character; int nextCode; …
sana
  • 410
  • 2
  • 6
  • 24
0
votes
1 answer

Write numbers to a file instead of string for data compression?

I was encoding a simple text file using LZW algorithm in python. However, i realised that i can only write a string to a .txt file using the write() function, which itself occupies almost as much space. So is it possible to somehow just write actual…
Dhruv Chadha
  • 1,161
  • 2
  • 11
  • 33
0
votes
0 answers

xzgrep and other Compressed Pattern Matching Tools

I'm experimenting on compressed pattern matching utilities, or more specifically searching for text patterns within LZW-compressed text files. I'm wondering if the xzgrep Linux utility is applying a certain algorithm for achieving that, or is it…
Ahmed Tawfik
  • 363
  • 4
  • 13
0
votes
1 answer

Is it a good idea to compress a set of text file with a predefined Huffman table?

I have some text file (plain ascii) which I wish to compress them with huffman coding, since the compressed file are going to be used in a limited resource hardware, the decompressing operation must be simplified as much as possible. So I am…
Iman Nia
  • 2,255
  • 2
  • 15
  • 35
0
votes
1 answer

can we create gif image without lzw compression?

I want to create a gif image from scratch using hex codes. I do not want to use LZW compression on the image data I produce. Is it possible to create a gif without LZW compression on image data so that all image viewing softwares can read it?
gnikesh
  • 3
  • 4
0
votes
1 answer

Issues with LZW algorithm variable-length decoding procedure

The setup Say I've got: A series of numbers resulting from LZW compression of a bitmap: 256 1 258 258 0 261 261 259 260 262 0 264 1 266 267 258 2 273 2 262 259 274 275 270 278 259 262 281 265 276 264 270 268 288 264 257 An LZW-compressed,…
alex
  • 6,818
  • 9
  • 52
  • 103
0
votes
0 answers

JAVA LZW decompression algorithm not yeilding decompressed file

import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import…
InfinityCounter
  • 374
  • 2
  • 4
  • 14
0
votes
2 answers

DEFLATE method reasoning

Why does LZ77 DEFLATE use Huffman encoding for it's second pass instead of LZW? Is there something about their combination that is optimal? If so, what is the nature of the output of LZ77 that makes it more suitable for Huffman compression than LZW…
0
votes
1 answer

Extracting contents of archived files in place using 7-Zip and PowerShell

I want to extract all *.Z files in place in their current directories (7-Zip support LZW/UNIX compression). I can't figure out why this is not working. I know how to use PowerShell to recursively get a full path of a filename and directory in which…
Bob Dylan
  • 1,773
  • 2
  • 16
  • 27
0
votes
1 answer

Purpose of XOR-ing with 0?

So i have a static hash table and before adding a code in the table, index is being XOR-ed with 0. Why is that the case if index of the table is already declared as integer? h = 0; h ^= (i << LZW_HASH_SHIFT); if (h >= LZW_HASH_SIZE) { h -=…
Sir DrinksCoffeeALot
  • 593
  • 2
  • 11
  • 20