compression

Best compression technique for binary data? [closed]

旧巷老猫 提交于 2019-12-03 17:39:25
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have a large binary file that represents the alpha channel for each pixel in an image - 0 for transparent, 1 for anything else. This binary data needs to be dynamically loaded from a text file, and it would be useful to get the maximum possible compression in it. De-compression times aren't majorly important

Compressing huge files (> 2GB) into ZIP on the client side

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 17:09:35
问题 Im building an upload tool using node.js and socket.io , because they usually upload incredibly huge files and normal upload forms wouldnt work. The problem is that they wanted to compress the files into a zip before sending them, to increase efficiency in transmission. I've been researching around compression methods like JSZip or zip.js, but neither of those work well with extremely big files. What could I do? 回答1: You can compress up to 4GB of data with zip.js but: it will work only with

Video Compression ios : Reduce the size of a video usin AVAssetWriter

寵の児 提交于 2019-12-03 17:03:10
I am Successful in encoding a series of image captured by AVCaptureVideoPreviewLayer of AVFoundation Framework into a Video using AVAssetWriter and AVAssetWriterInput. But the size of the video is too large, Can anyone of you suggest me a tutorial or atleast a direct me in this case or give me the correct Video output Settings for video compression. I am using the following VideoOutputSetting. videoOutputSettings = @{ AVVideoCodecKey: AVVideoCodecH264, AVVideoWidthKey: [NSNumber numberWithInt:width], AVVideoHeightKey: [NSNumber numberWithInt:height], AVVideoCompressionPropertiesKey: @{

What is the best compression algorithm for small 4 KB files?

时光怂恿深爱的人放手 提交于 2019-12-03 16:54:06
问题 I am trying to compress TCP packets each one of about 4 KB in size. The packets can contain any byte (from 0 to 255). All of the benchmarks on compression algorithms that I found were based on larger files. I did not find anything that compares the compression ratio of different algorithms on small files, which is what I need. I need it to be open source so it can be implemented on C++, so no RAR for example. What algorithm can be recommended for small files of about 4 kilobytes in size? LZMA

DCT Compression - Block Size, Choosing Coefficients

冷暖自知 提交于 2019-12-03 16:48:11
I'm trying to understand the effect of the Block Size and best strategy of choosing the Coefficients in DCT compression. Basically I want to ask what I wrote here: Video Compression: What is discrete cosine transform? Lets assume the most primitive compression. Making block of an image. Performing a DCT on each blog and zeroing out some coefficients. To my understanding, the smaller the block the better. Smaller blocks means the Pixels are more correlated hence the energy in the DCT spectrum is more "Compact". It should be more emphasized in a fast varying images (High Frequency). Let's say we

Batch file to compress subdirectories

◇◆丶佛笑我妖孽 提交于 2019-12-03 16:30:52
I am trying to write a batch script that will run automatically compressing subdirectories using winrar or 7-zip: Example: My Pictures Pics1 (Pics1.zip) File1.jpg File2.jpg File3.jpg Pics2 (Pics2.zip) File4.jpg File5.jpg Pics3 (Pics3.zip) File6.jpg File7.jpg ... How do i write script. (1) Using WinRAR: WinRAR includes two command-line tools, rar.exe and unrar.exe , where rar.exe compresses and unrar.exe uncompresses files. Both are located in the C:\Program Files\WinRAR folder in the installable version. Assuming, if there are multiple subfolders under C:\MyPictures and you want each subfolder

Compressing a set of large integers

自闭症网瘾萝莉.ら 提交于 2019-12-03 16:13:32
问题 I have a set of integers, for which I would like to have the most compact representation. I have the following constraints/features: it is set, or in other words, a list of unique integers in which the order does not matter the size of the set L is relatively small (typically 1000 elements) the integers follow a uniform distribution between 0 and N-1, with N relatively large (say 2^32) the access to the elements of the compressed set are random, but it is fine if the decompression procedure

GZip compression in IIS7 not working, but content-encoding header is set to gzip

大憨熊 提交于 2019-12-03 16:02:59
I have IIS 7.5 with static and dynamic compression enabled. It seems to work fine for dynamic files, but for static ones it behaves erratically, often sending a http header "Content-Encoding: gzip" when the content is not compressed. This causes browsers to attempt to uncompress, throwing an invalid magic number error. Here's my configuration: <httpCompression dynamicCompressionDisableCpuUsage="95" dynamicCompressionEnableCpuUsage="70" > <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" /> <dynamicTypes> <add mimeType="text/*" enabled="true" /> <add mimeType="application/javascript"

Issues uncompressing a tar.gz file

独自空忆成欢 提交于 2019-12-03 15:42:01
问题 I have been trying to uncompress the following file: sudo wget http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.tar.gz with the following: sudo tar zxvf jdk-7u21-linux-x64.tar.gz -C /usr/lib/jvm/ I am getting this error gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now I am using an Amazon Linux instances. By default jre is installed instead of the jdk, which I need to be able to run jboss. I would install the jdk

Creating a ZIP file from a folder in documents directory - Objective C (ARC)

偶尔善良 提交于 2019-12-03 15:19:16
I have an iPhone application that I have developed using ARC. I have a folder that contains a heap of images in my documents directory that I need to zip up and e-mail. My project uses ARC. Does anyone have any example code/links to a resource that would be helpful to me? I've been raking around online and what I can find is not compatible with ARC - even when it claims to be. iPhone Developer Download and drag the Objective-Zip, MiniZip and ZLib drag in to your project from this link http://code.google.com/p/objective-zip/downloads/list (Objective-zip). import the files: ZipFile.h,