lossless-compression

Lossless RGB to Y'CbCr transformation

ε祈祈猫儿з 提交于 2019-12-18 11:57:01
问题 I am trying to losslessly compress an image, and in order to take advantage of regularities, I want to convert the image from RGB to Y'CbCr. (The exact details of what I mean by RGB and Y'CbCr are not important here; the RGB data consists of three bytes, and I have three bytes to store the result in.) The conversion process itself is pretty straightforward, but there is one problem: although the transformation is mathematically invertible, in practice there will be rounding errors. Of course

h264 lossless coding

点点圈 提交于 2019-12-17 08:33:59
问题 Is it possible to do completely lossless encoding in h264? By lossless, I mean that if I feed it a series of frames and encode them, and then if I extract all the frames from the encoded video, I will get the exact same frames as in the input, pixel by pixel, frame by frame. Is that actually possible? Take this example: I generate a bunch of frames, then I encode the image sequence to an uncompressed AVI (with something like virtualdub), I then apply lossless h264 (the help files claim that

h264 lossless coding

喜你入骨 提交于 2019-12-17 08:32:27
问题 Is it possible to do completely lossless encoding in h264? By lossless, I mean that if I feed it a series of frames and encode them, and then if I extract all the frames from the encoded video, I will get the exact same frames as in the input, pixel by pixel, frame by frame. Is that actually possible? Take this example: I generate a bunch of frames, then I encode the image sequence to an uncompressed AVI (with something like virtualdub), I then apply lossless h264 (the help files claim that

String compression in JavaScript

送分小仙女□ 提交于 2019-12-17 06:30:16
问题 I'm looking for a JavaScript function that given a string returns a compressed (shorter) string. I'm developing a Chrome web application that saves long strings (HTML) to a local database. For testing purposes I tried to zip the file storing the database, and it shrank by a factor of five, so I figured it would help keep the database smaller if I compressed the things it stores. I've found an implementation of LZSS in JavaScript here: http://code.google.com/p/u-lzss/ ("U-LZSS"). It seemed to

String compression in JavaScript

筅森魡賤 提交于 2019-12-17 06:30:07
问题 I'm looking for a JavaScript function that given a string returns a compressed (shorter) string. I'm developing a Chrome web application that saves long strings (HTML) to a local database. For testing purposes I tried to zip the file storing the database, and it shrank by a factor of five, so I figured it would help keep the database smaller if I compressed the things it stores. I've found an implementation of LZSS in JavaScript here: http://code.google.com/p/u-lzss/ ("U-LZSS"). It seemed to

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

左心房为你撑大大i 提交于 2019-12-12 08:14:13
问题 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, or any other jpeg optimizer directly but I have noticed that punypng shrinks file sizes down about 4-6% on the larger jpeg images LOSSLESSLY. Meta data is already stripped from the images during upload (via jumpoader) so that is not an option

Write a program that takes text as input and produces a program that reproduces that text

余生颓废 提交于 2019-12-12 07:09:16
问题 Recently I came across one nice problem, which turned up as simple to understand as hard to find any way to solve. The problem is: Write a program, that reads a text from input and prints some other program on output. If we compile and run the printed program, it must output the original text. The input text is supposed to be rather large (more than 10000 characters). The only (and very strong) requirement is that the size of the archive (i.e. the program printed) must be strictly less than

Is there a way to do lossless compression for generated GIFs?

China☆狼群 提交于 2019-12-11 11:36:16
问题 We are using the following code to generate GIF file from a set of JPEG images, for the setting on doing lossless compression, it doesn't seem to generate a smaller sized file at all. Are we doing the right thing here? CGImageDestinationRef imageDestination = CGImageDestinationCreateWithURL((CFURLRef)pathUrl, CFSTR("com.compuserve.gif"), images.count, NULL); // image/frame level properties NSDictionary *imageProperties = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithFloat

How to make jpeg lossless in java?

喜你入骨 提交于 2019-12-08 20:21:05
问题 Is there someone that can tell me how to write 'jpeg' file using lossless compression in java? I read the bytes using the code below to edit the bytes WritableRaster raster = image.getRaster(); DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer(); And I need to write again the bytes as 'jpeg' file without compressing in lossy . 回答1: The JAI package offers the ability to save “lossless JPEG” formats. Set compresion type to JPEG-LS or JPEG-LOSSLESS depending on what variant you want.

Storing Probability table during text compression

主宰稳场 提交于 2019-12-08 04:14:30
问题 I am doing a project where I compare different types of Text compression methods such as Huffman and Arithmetic for both static and adaptive form. I make a probability table for both using the number of occurrence of each letter in the text. Now, for adaptive form, the receiver does not need the Probability table but for the static form, we need to transmit this probability table as well to the receiver for decoding the message. Now this storing of the table will need some extra bits, which