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.
193
questions
0
votes
0
answers
12
views
How to Implement Static Dictionary Compression?
I am targeting a simple dictionary-coder compression algorithm that uses a static dictionary (code in an existing program, but I can supply my own dictionary). How can I write a compressor for such an ...
0
votes
0
answers
47
views
Is there a more efficient compression algorithm to compress a 64base encoded string?
Say I have a 5 character string, and the characters can be one of 64 characters [a-zA-Z0-9+/]. I want to generate every possible string (64^5 strings) and store those strings in a DB and minimize the ...
-1
votes
1
answer
55
views
decompress a doc file using LZS algorithm
https://github.com/sgherro/Exercises-cpp/blob/89bbd78eeac9666ed20f083ebf116e693a8c23ce/Lempel-Ziv-Stac/main.cpp
I am using this algorithm to decompress my doc file but it only decompress the partial ...
0
votes
0
answers
22
views
Why do some compression algorithms not change the size of the archive file, and some do?
This is a list of file sizes that were compressed. They are all originally from \dev\urandom, thus pretty pseudo random. The yellow file is the original size of any and all of them.
The pink files are ...
0
votes
1
answer
34
views
How would I go about finding the most common substring in a file [duplicate]
To preface, I am attempting to create my own compression method, wherein I do not care about speed, so lots of iterations over large files is plausible. However, I am wondering if there is any method ...
2
votes
0
answers
28
views
Why doesn't lz4 keep small/uncompressible values uncompressed?
When compressing small values (< 500 bytes or so), and for uncompressible random values,
lz4 returns data that is much larger than the original value (e.g. 27 bytes from 4).
When a large amount of ...
0
votes
1
answer
76
views
Alternatives for Error level Analysis (ELA)
I am working on Image processing with deep learning and I came on to the topic Error level Analysis which gives/shows the difference in compression level(I'm trying to show if the image as gone under ...
0
votes
0
answers
26
views
What is the optimum precision to use in an arithmetic encoder?
I've implemented an arithmetic coder here - https://github.com/danieleades/arithmetic-coding
i'm struggling to understand a general way to choose an optimal number of bits for representing integers ...
0
votes
0
answers
427
views
Lossless Image compression in python using Open CV or any other modules
I want to perform lossless compression on the image Example image attached here. It is a 16 bit image of 1024*1024.
I realized that lossless compression is possible using PNG format with Open CV. Open ...
1
vote
1
answer
143
views
Does JPEG allow lossless encoding?
As far as I know, a modern JPEG decoder produces the same image when given the same input JPEG file.
Normally, we create JPEG files in such a way that the decoded image is an approximation of some ...
0
votes
2
answers
201
views
Tips on document compression (PDF and EPUB in particular) [closed]
As the title says I'm looking for some tips on how to compress PDF and EPUB documents. I have a large dataset of documents (pdf and epub) and static graphics (png, jpeg, webp) that I'm trying to ...
0
votes
0
answers
15
views
Analyse redundancy in videos for compression
I'm looking for a method that is able to detect information redundancy in videos (series of images) and then, perform some smart compression of the video or decide which frames could be skipped.
...
0
votes
1
answer
62
views
Is it possible to have two different Huffman encoding scheme yielding different number of bits?
I made a solution for Huffman encoding but my code is not yielding expected output.
I cannot figure out what is wrong.
Any help is appreciated.
abcdef
1 2 3 3 5 5
Your Output:
00 01 10 110 1110 1111 ...
0
votes
1
answer
53
views
What is a suitable compression algorithm for a large set of UTF-16 strings(multilingual)?
I need to compress a large number of short multilingual strings(<1000bytes each). I have tried implementing LZW with a separate dictionary for each language. Is there a better solution for this? ...
0
votes
1
answer
101
views
ZLIB returns different byte values after a compression and decompression
I have a 3d ndarray that I want to decompress using Zlib.
I use this part of the code to compress.
begin = 0
blockSize = 1024
compressImage = bytes('', 'utf-8')
while begin < len (nii_img1_data):
...
1
vote
1
answer
37
views
Can image have different bits per pixel and different bit dept
I have a 24-bit dept png image.
Image details
Size : 4663KB
Witdh: 1920 pixels
Height: 1080 pixels
Bit Dept: 24 bit
I calculated its bits per second using the formula bpp = Scomp / NPixels said by ...
0
votes
0
answers
50
views
Compression using a pre-initialized static dictionary
I have recently encountered a compression algorithm that is incredibly easy to express and write a de-compressor for. I am struggling to reason about how to write a good compression algorithm for it, ...
0
votes
1
answer
34
views
Changing FLAC channel assignment to decorrelated left-side causes lost sync error status
I have created a minimal stereo FLAC file according to the specifications here. It is a single block of 8192 samples of 0 encoded as a constant:
00000000: 664c 6143 8000 0022 2000 2000 0000 0000
...
1
vote
1
answer
65
views
Simple compressed audio encoder for experimenting
Mostly for my own experience and curiosity, I am trying to investigate formats of files and data to get a good enough understanding of them to output files that can be recognized by corresponding ...
0
votes
1
answer
27
views
What sort of transformations could make a large sum of data of 3D arrays more compressible with zstd?
There is not much sources on this,I would like ideas and ways of thinking that will enable my understanding.
1
vote
1
answer
111
views
Compress redundant/overlapping array data
Imagine a million or more arrays that overlap in data (sometimes more and sometimes less). The data is always sorted in ascending order. A single value comes at 2 bytes.
Here are some examples:
[0, 1, ...
1
vote
2
answers
289
views
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 ...
0
votes
2
answers
63
views
Algorithm to break down a list of item into the minimum number of groups that can be used to represent it
I'm sorry for the broad question, but I'm struggling on how to start with this one. I have a vague idea what I'm actually trying to do is something a compression algorithm does, but really I'm looking ...
0
votes
1
answer
157
views
Images only render when the element is inspected
I am trying to use javascript to populate Swiper JS slides using JavaScript. However, only the first image seems to load and the other only load when I inspect the page. I've tried to remove any ...
0
votes
0
answers
131
views
Effective compression with h5py for dataset with a lot of repetitions
I have HDF5 files that consist numpy.array with dim = (N, M, Q), where N - is a number
of such matricies. The main property of them that values are represented as a power of two and have a lot of ...
2
votes
1
answer
56
views
arithmetic encoder symbol lookup
I have working simplish arithmetic encoder based on Drdobbs ARcoder. The de/encoding algorithm boils down to maintaining symbol probabilities in array and updating them. The problem is that I would ...
0
votes
1
answer
134
views
How to specify how lossy/lossless a .webm conversion will be (in ffmpeg)?
I can't seem to understand how to make the conversion lossless (or at least visually lossless)? The outputs have some fast moving parts at times, and the output would become blocky; I would like to ...
0
votes
1
answer
117
views
Obtain a git blob size efficiently in Java
I have a bunch of object ids referring to blobs in a given git repository. I would like to obtain the number of bytes that their uncompressed content occupies, preferably using JGit. That is, the ...
1
vote
1
answer
521
views
How to efficiently store Huffman Tree and Encoded binary string into a file?
I can easily convert a character string into a Huffman-Tree then encode into a binary sequence.
How should I save these to be able to actually compress the original data and then recover back?
I ...
0
votes
1
answer
35
views
File compression/decompression of binary representations of integer lists
Currently, I have a system that converts a list of integers to their binary representations. I calculate the number of bytes each number requires and then use the to_bytes() function to convert them ...
1
vote
2
answers
34
views
possible to recreate a file using metadata, SHA, and a few bytes?
I may be a fool, but I hope that it would be possible to recreate an exact copy of a file if we only have:
it's exact lenght and type
a few of it's begining bytes( suppose 100)
it's md5 and sha256 ...
1
vote
1
answer
601
views
How to change playback speed in LosslessCut?
Might sound like a strange question, but hear me out. I have hours of video I want to cut up and edit together, but a lot of it is just junk I don't need. I don't want to lose any quality, so I use ...
0
votes
2
answers
601
views
Lossless compression of a sequence of similar grayscale images
I would like to have the best compression ratio of a sequence of similar grayscale images. I note that I need an absolute lossless solution (meaning I should be able to check it with an hash algorithm)...
0
votes
1
answer
141
views
Compression algorithms for nearly uniform data
I've seen questions on compression algorithms around SE, but none quite fit what I'm looking for. Clearly truly uniformly distributed data cannot be compressed, but how close can we get?
My (probably ...
-1
votes
1
answer
163
views
Optimize images - Losslessly compress images in php [closed]
Images are stored in a different server than the one i use. Is there a way to losslessly compress them using php and after compression show the images to my site without having to download the images ...
3
votes
1
answer
109
views
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 ...
1
vote
1
answer
470
views
Codec for lossless 8-bit grayscale
I have a camera that outputs 160 fps of 1024x1280 pixels in 8-bit grayscale (256 colors).
I need to encode this live without any loss.
What's the best codec for this?
I can code this in either python ...
0
votes
1
answer
131
views
Video compression for backup purposes
I'd like to know if there is a method/application to further compress MP4 files without loss as compressed files (zip-like) for archival purposes, even if I had to make a bigger file before ...
0
votes
1
answer
803
views
ffmpeg lossless conversion webm to mp4 produces file not visibile by winmediaplayer
I have some webms (around 3 mb each) and I need to transform them in mp4, possibly using an RGB profile.
I need a true lossless conversion because I need to extract rgb info from the files to do ...
1
vote
1
answer
181
views
How can the png lossless format have different quality?
So I just wanted to ask this question because there is a quality slider for png in Adobe Photoshop.
Now the reason why I find this very confusing is I know that PNG is a lossless format.
I'm not sure ...
1
vote
2
answers
930
views
Lengthy string compression/decompression in Java
I am looking for String length compression to avoid lengthy filename as below. The string contains UTF-8 characters as well.
"dt=20200623_isValid=valid_module_name=A&B&C_data_source=...
3
votes
0
answers
50
views
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 ...
0
votes
1
answer
94
views
I want to do encryption on the faces detected in a video to preserve the identity. And then perform decryption on that video to reveal faces
I am working in python and this is what I have tried-
Used the OpenCv to identify the faces and obtain coordinates of faces in the video frame.
Passed that frame and coordinates to encryption algo (I'...
0
votes
1
answer
990
views
Playing an .m4a audio file in an HTML page doesn't work
I'm trying to play an m4a file on a webpage and it doesn't work.
I'm using the voice memo app on an iPhone to generate these files.
I notice the following (Findings):
When I switch my settings IOS > ...
2
votes
1
answer
4k
views
LZ4 and Zstd for Java
Is there any Best Java Compression Library available for LZ4 and ZStd. I have tried with apache commons ( which is zstd-jni implementation)
String fileURL = TestFileUtil.getFileURL(...
1
vote
0
answers
52
views
Why should size of file be given in packbits algorithm?
This is my school assignment to zip and unzip files in packbits method using either c or c++.my question is:
Why cant we just use EOF instead of knowing file size??
Since my program isn't working,I ...
3
votes
1
answer
1k
views
Lossless Video Compression formats
I create lots of 4K 60fps 3D animations, and every frame of these animations are exported as separate PNG files to my disk drive. These PNG files use their own lossless compression method, but the ...
0
votes
1
answer
107
views
Use LZMA to codificate a stream of information
The professor gave me a research paper that shows a way to efficiently compress some kind of data.
It's not worth to eplain the full algorithm since the question is not about that, I just introduce a ...
1
vote
2
answers
506
views
How to Inflate a png compressed by zopfli
I compressed a png file using ImageOptim. I used the Zopfli as the method of compressing. ImageOptim guarantees that it's a lossless compression. Truly my png size has reduced, but how can i ...
1
vote
0
answers
177
views
How XML compression algorithms (example XMill) are so fast?
I was studying an XML compression algorithm named XMill. I tried to implement it myself in Java. There are lots of XMLs at this link, I used a structural XML (contains only tags) of "EXI-Telecomp" for ...