Questions tagged [compression]

The name given to the process of encoding data such that it uses lesser number of bits as compared to the original representation.

There are a number of techniques to compress information, with most algorithms working to compress image, speech, music or video. Encoding the same information in lesser bits results in saving some crucial resource such as transmission bandwidth or hard-disk space. Compression algorithms also take advantage of human perception to further reduce the size of information. By encoding the same piece of information with fewer bits in places that the human brain is not accustomed to perceiving as well as other parts, substantial gains in compression ratios can be achieved.

9175 questions
20
votes
2 answers

Enable compression on facebook sdk served files to optimize site

I was running page speed insights on my website and was given the following result: Compressing resources with gzip or deflate can reduce the number of bytes sent over the network. Enable compression for the following resources to reduce their…
20
votes
5 answers

uploading and compressing file to s3

I've recently started working with S3 and have come across this need to upload and compress large files (10 GB +-) to S3. The current implementation I'm working with is creating a temporary compressed file locally and then uploading it to S3 and…
VmLino
  • 291
  • 1
  • 2
  • 7
20
votes
3 answers

How to compress JSON with PHP?

I'm writing a little analysis page which will help me hunt down bugs in an application. In essence it allows to visually compare actual data and log entries, plus perform a bit of analysis on the data. Since this is for debugging only and since I…
Vilx-
  • 104,512
  • 87
  • 279
  • 422
20
votes
3 answers

print content of more than one file in a zip archive

I have some zip files that are really large and I want to print them without extracting first. I am using zcat and zless to do that and then I redirect the output to a different application. When my zip file contains more than one text file I…
nikosdi
  • 2,138
  • 5
  • 26
  • 35
20
votes
9 answers

How to use System.IO.Compression to read/write ZIP files?

I know there are libraries out there for working with ZIP files. And, you can alternatively use the functionality built into Windows for working ZIP files. But, I'm wondering if anyone has worked out how to use the tools built into the…
Chris Pietschmann
  • 29,502
  • 35
  • 121
  • 166
20
votes
9 answers

HTML online minimizer/compressor?

Does anyone know of a good online generator to take the source code of an HTML page and compress/minimize the entire page. Meaning, compress/minimize all embedded CSS, JavaScript and obviously the HTML of that web page while also removing unneeded…
Ted
  • 217
  • 1
  • 2
  • 3
20
votes
3 answers

What is the canonical method for an HTTP client to instruct an HTTP server to disable gzip responses?

I thought this was a simple google search, but apparently I'm wrong on that. I've seen that you should supply: Accept-Encoding: gzip;q=0,deflate;q=0 in the request headers. However, the article that suggested it also noted that proxies routinely…
Homer6
  • 15,034
  • 11
  • 61
  • 81
19
votes
2 answers

TypeError: Cannot read property 'tapPromise' of undefined

I am using Angular Build Optimization in Angular 9 project and using below code for generating bundles but getting below error. I Google with the error but didn't find any concrete answer. As the error suggests issue is in the library itself only. I…
Atif
  • 248
  • 1
  • 3
  • 11
19
votes
5 answers

Packet oriented lossless compression library

Does anyone know of a free (non-GPL), decently performing compression library that supports packet oriented compression in C/C++? With packet oriented, I mean the kind of feature QuickLZ (GPL) has, where multiple packets of a stream can be…
porgarmingduod
  • 7,668
  • 10
  • 50
  • 83
19
votes
13 answers

Is there a safe way to run a diff on two zip compressed files?

Seems this would not be a deterministic thing, or is there a way to do this reliably?
ApplePieIsGood
  • 3,731
  • 6
  • 35
  • 51
19
votes
3 answers

PHP Manual GZip Encoding

I was testing my website with Page Speed and the result was around 70/100. Enable Compression was the first and most important factor in slowing it down. I know that I can do that by modifying the php.ini to automatically do that but I was more…
M.Alnashmi
  • 582
  • 1
  • 4
  • 15
19
votes
5 answers

Free compression library for C# which supports 7zip (LZMA)

I have a program (written in C#) that reads/writes its data directly (direct file access without server) to firebird database files. For a better exchange I want to (un)compress them on import/export for a better exchange over the internet without…
Xn0vv3r
  • 17,766
  • 13
  • 58
  • 65
19
votes
5 answers

Avoid Video Compression when Selecting Movie with UIImagePickerController?

I'm using UIImagePickerController to allow my user to select a video from the asset library. When the user selects the "Choose" button on the second screen, the view displays a progress bar and a "Compressing Video..." message. Why is this…
Avalanchis
  • 4,500
  • 3
  • 39
  • 48
19
votes
3 answers

IOS Video Compression Swift iOS 8 corrupt video file

I am trying to compress video taken with the users camera from UIImagePickerController (Not an existing video but one on the fly) to upload to my server and take a small amount of time to do so, so a smaller size is ideal instead of 30-45 mb on…
Andrew Edwards
  • 1,005
  • 1
  • 9
  • 24
19
votes
5 answers

Image compression like Whatsapp and other messengers on Android

I am using the following code for image compression. The code compresses image files that are larger than 2 MB. But this code takes time and image quality stays pure. public static String compressImage(String imagePath, Context context) { …
user3748230