Questions tagged [lossless-compression]

Lossless data compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data.

Lossless data compression is used in many applications. For example, it is used in the ZIP file format and in the GNU tool gzip. It is also often used as a component within lossy data compression technologies (e.g. lossless mid/side joint stereo preprocessing by the LAME MP3 encoder and other lossy audio encoders).

220 questions
4
votes
1 answer

Reconstruct original 16-bit Raw pixel data from the HTML5 canvas

If a 16-bit single channel (Gray-scale) raw pixel data losslessly encoded into Image format(e.g.PNG, Webp , Jpeg-2000 or JPEG-XR) and Image rendered to HTML5 canvas, then is there any way to retrieve original 16-bit Raw pixel data from the canvas?
4
votes
2 answers

What is the best compression scheme for small data such as 1.66kBytes?

This data is stored in an array (using C++) and is a repetition of 125 bits each one varying from the other. It also has 8 messages of 12 ASCII characters each at the end. Please suggest if I should use differential compression within the array and…
4
votes
3 answers

Can anyone make heads or tales of this spigot algorithm code Pitiny.c

This C program is just 143 characters long! But it “decompresses” into the first 10,000 digits of Pi. // Created by cheeseMan on 30/11/13. long a[35014],b,c=35014,d,e,f=1e4,g,h; int main(int argc, const char * argv[]) { for(;(b=c-=14); …
BrianBeaven
  • 173
  • 1
  • 2
  • 11
4
votes
4 answers

Similar images compression

I have bunch of similar images. Those images contains different noise, but edges and histograms are very similar. I need to compress this images loselessly. Is there any algorithm, that can use image similarity for more efficient compression ? I…
Martin Perry
  • 9,232
  • 8
  • 46
  • 114
4
votes
1 answer

Lossless JPEG file writing

I have a question with regard to JPEG file writing. Suppose I have a PNG file example.png, and I want to change the file format to JPEG without any information loss. For the now being, I have two solutions: Solution 1: perform the file formatting…
feelfree
  • 11,175
  • 20
  • 96
  • 167
4
votes
5 answers

Using jpegtran, jpegoptim, or other jpeg optimization/compression in C#

I've got 100's (maybe 1000's) of products with 10-30 images of each product coming to an online store I've put together. I need to optimize the images' file sizes as much as possible without loosing image quality. I haven't used jpegtran, jpegoptim,…
David Murdoch
  • 87,823
  • 39
  • 148
  • 191
4
votes
3 answers

Lossless codec for bayer data

I'm working with lots of camera's which capture in BG bayer pattern natively. Now, every time I record some data, I save it to the disk in the raw bayer pattern, in an avi container. The problem is, that this really adds up after a while. After one…
vhdirk
  • 598
  • 1
  • 4
  • 12
3
votes
1 answer

How to compress an alphabet consisting of DNA sequence

I want to compress a DNA sequence with a compression technique rather than Huffman and Adaptive Huffman algorithm, i'm using c# as a programming language. can anyone lead me to an algorithm. Note: I want a lossless compression
Sara S.
  • 1,365
  • 1
  • 15
  • 33
3
votes
2 answers

Using a preset deflate dictionary to reduce compressed archive file size

I have a requirement where text files are send from one location to other. Both location are in our control. The nature of content and the words that could appear in this are mostly the same. Which means, if I keep the delate dictionary in both…
esafwan
  • 17,311
  • 33
  • 107
  • 166
3
votes
1 answer

Which deflate (zip) algorithm characteristics can cause a 50% compression factor on the recompression of certain data?

It's well-known that recompression (compressing a compressed dataset) generally yields a very low (or no) compression. Hence, I've been very surprised to find a dataset where the second ZIP recompression yields a roughly 50% compressions factor…
Marcus
  • 5,104
  • 2
  • 28
  • 24
3
votes
0 answers

Source code or detailed explanation of “WKS” virtual memory compression algorithm?

I asked this question on cs.stackexchange.com, but I haven't received any helpful replies -- only some comments stating that my question was off-topic, so, I'm asking it here, as per the StackExchange guidelines : I've been trying to find…
3
votes
1 answer

Lossless and Identical way - BufferedImage to File

I have a BufferedImage Object which I have manimulated it pixels (The numeric values). Now how can I save it to a file - preferable JPEG file - without any change in pixels values???
ehsun7b
  • 4,796
  • 14
  • 59
  • 98
3
votes
1 answer

Is H.264 used with CRF 0 really strictly lossless?

I am surprised by how small files are when encoded in ffmpeg with the libx264 codec in Constant Rate Factor mode equals zero (-crf 0) that, according to the documentation, is "lossless". I would like to make sure what the word "lossless" here means.…
Mephisto
  • 640
  • 1
  • 6
  • 12
3
votes
3 answers

lossless video codec playback in Java

I need to encode a sequence of frames with a lossless video codec and play them in a Java app. I don't care about the file size. The output frames should match the input frames exactly. Lossy codecs don't do this even at high bit rates. None of…
palm3D
  • 7,970
  • 6
  • 28
  • 33
3
votes
5 answers

Good compression scheme for continued fraction terms?

So I'm implementing a continued fraction library for handling a subset of quadratic integers and rational numbers. Continued fraction terms are represented by unsigned integers. I've noticed the following general patterns when working with…
1 2
3
14 15