compression

GZipStream decompression performance is poor

拥有回忆 提交于 2019-12-09 03:19:52
问题 I have a .NET 2.0 WinForms app that connects to a backend WAS server. I am using GZipStream to decode data coming back from a HttpWebRequest call made to the server. The data returned is compressed CSV, which Apache is compressing. The entire server stack is Hibernate-->EJB-->Spring-->Apache. For small responses, the performance is fine (<50ms). When I get a response >150KB, it takes more than 60 seconds to decompress. The majority of the time seems to be spent in the GZipStream constructor.

7z extension for php?

浪子不回头ぞ 提交于 2019-12-09 02:30:03
问题 I can't find one and I don't know if any of PHP Compression and Archive Extensions will work. Do you think I could use a compression stream to read data from a 7z file? UPDATE 7z forums have a lot of requests for a php extension 回答1: The 7z file format can use various compression algorithms, so you might be able to decompress the archive with one of the existing utilities for bzip2 or deflate. I found a 7z PHP class as well, and you are lucky since it's still being developed. Here is the

Can i use more heap than 32 GB with compressed oops

二次信任 提交于 2019-12-08 23:51:58
问题 I could understand that with compressed oops , we can only use 32 GB of RAM. Is there someway i can use more than that like by allocating 2 heap or something ? Thanks Vineeth 回答1: You can't have multiple heaps (you can have multiple JVMs though, which is called scaling out as opposed to scaling up). JVM uses compressed object pointers automatically below 32 GiB of memory. If you understand how it works (dropping youngest three bits from each address as they are always 0 due to memory

Which files does not reduce its size after compression [closed]

萝らか妹 提交于 2019-12-08 19:51:17
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I have written a java program for compression. I have compressed some text file. The file size after compression reduced. But when I tried to compress PDF file. I dinot see any change in file size after compression. So I want to know what other files will not reduce its size after

Cannot compress dSyms

时光毁灭记忆、已成空白 提交于 2019-12-08 19:30:18
问题 I need to compress dSYMs folder that contains dSYM file But i'm stuck Good thing is, I was able to compress using commandline zip -r outputFile.zip *.dSYM 回答1: I had the same issue. I was able to work around it by copying the dSYMs folder from my package contents to my hard drive. Then I could zip it instantly. I think the issue is trying to compress from the package contents. I followed the steps from this answer but instead of compressing from the package contents I copied it to another

GZIPOutputStream: Increase compression level

爷,独闯天下 提交于 2019-12-08 14:54:12
问题 java.util.zip.GZIPOutputStream does not provide a constructor argument or a setter for the compression level of its underlying Deflater . There are ways to work around this issue, as described here, for example: GZIPOutputStream gzip = new GZIPOutputStream(output) { { this.def.setLevel(Deflater.BEST_COMPRESSION); } }; I GZIPped a 10G file with this and its size didn't decrease by a single bit compared to using the preset DEFAULT_COMPRESSION. The answer to this question says that under certain

jpeg compression - lossy or lossless

╄→гoц情女王★ 提交于 2019-12-08 13:55:48
问题 I have few questions on JPEG Compression. In my windows system, I have some image processing application. For example, Windows msPaint: which provides an option to convert BMP image to JPEG format. Can anybody please tell me, what is the JPEG compression here using in mspaint- is it lossy or lossless. If somebody is referring to "JPEG Standard compression", which compression it is internally using: lossy or lossless? Thanks in advance. Alvin 回答1: JPEG compression is considered a lossy

LZW Data Compression In Lua [duplicate]

Deadly 提交于 2019-12-08 13:43:18
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: LZW Compression In Lua Here is my code for compressing data in Lua using the LZW compression method. My problem is that the function is returning the character 'T', instead of returning the full compressed string 'TOBEORNOTTOBEORNOT'. Thanks! function compress(uncompressed) local dict_size = 256 local dictionary = {} w = "" result = {} for i = 1, #uncompressed do local c = string.sub(uncompressed, i, i) local wc

Is repacking a repository useful for large binaries?

ぐ巨炮叔叔 提交于 2019-12-08 13:21:33
I'm trying to convert a large history from Perforce to Git, and one folder (now git branch) contains a significant number of large binary files. My problem is that I'm running out of memory while running git gc --aggressive . My primary question here is whether repacking the repository is likely to have any meaningful effect on large binaries. Compressing them another 20% would be great. 0.2% isn't worth my effort. If not, I'll have them skipped over as suggested here . For background, I successfully used git p4 to create the repository in a state I'm happy with, but this uses git fast-import

How to use SharpCompress' BZip2Stream to compress a string?

元气小坏坏 提交于 2019-12-08 12:24:49
问题 I am trying to compress a string (str) using SharpCompress' BZip2Stream but unable to achieve it. Following is the code I have so far, public static string Compress(string str) { var data = Encoding.UTF8.GetBytes(str); using (MemoryStream stream = new MemoryStream()) { using (BZip2Stream zip = new BZip2Stream(stream, SharpCompress.Compressor.CompressionMode.Compress)) { zip.Write(data, 0, data.Length); var compressed = Encoding.UTF8.GetString(stream.ToArray()); return compressed; } } } No