compression

Are all PDF files compressed?

纵饮孤独 提交于 2019-12-30 08:00:11
问题 So there are some threads here on PDF compression saying that there is some, but not a lot of, gain in compressing PDFs as PDFs are already compressed. My question is: Is this true for all PDFs including older version of the format? Also I'm sure its possible for someone (an idiot maybe) to place bitmaps into the PDF rather than JPEG etc. Our company has a lot of PDFs in its DBs (some older formats maybe). We are considering using gzip to compress during transmission but don't know if its

7zip compress network stream

廉价感情. 提交于 2019-12-30 07:11:59
问题 I will like to compress a file before sending it through the network. I think the best approach is 7zip because it is free and open source. How I use 7zip with .net? I know that 7zip is free and that they have the source code in c# but for some reason it is very slow on c# so I rather call the dll 7z.dll that comes when installing 7zip for performance reasons. So the way I am able to eassily marshal and call the methods in 7z.dll is with the help of the library called sevenzipsharp . For

Uncompress GZIPed HTTP Response in Java

泪湿孤枕 提交于 2019-12-30 06:14:37
问题 I'm trying to uncompress a GZIPed HTTP Response by using GZIPInputStream . However I always have the same exception when I try to read the stream : java.util.zip.ZipException: invalid bit length repeat My HTTP Request Header: GET www.myurl.com HTTP/1.0\r\n User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2) Gecko/20100115 Firefox/3.6\r\n Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3\r\n Accept

Compressing strings for client/server transport in Java

我是研究僧i 提交于 2019-12-30 05:27:14
问题 I work with a propriety client/server message format that restricts what I can send over the wire. I can't send a serialized object, I have to store the data in the message as a String. The data I am sending are large comma-separated values, and I want to compress the data before I pack it into the message as a String. I attempted to use Deflater/Inflater to achieve this, but somewhere along the line I am getting stuck. I am using the two methods below to deflate/inflate. However, passing the

Save JPG in progressive format

做~自己de王妃 提交于 2019-12-30 04:40:28
问题 <Extension()> _ Public Sub Save(ByVal b As Bitmap, ByVal FileName As String, ByVal Compression As Long, ByVal MimeType As String) Dim Params As EncoderParameters = New EncoderParameters(2) Dim CodecInfo As ImageCodecInfo = GetEncoderInfo(MimeType) Params.Param(0) = New EncoderParameter(Encoder.RenderMethod, EncoderValue.RenderProgressive) Params.Param(1) = New EncoderParameter(Encoder.Quality, Compression) b.Save(FileName, CodecInfo, Params) End Sub this does not work. Its not saved as

Compression Libraries For C++ [closed]

我是研究僧i 提交于 2019-12-30 03:12:30
问题 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 5 years ago . I was reading about compression in programs and I started to create a new simple project, a zipper (just a zipper, not an unzipper), but I only found zLib, and it's for C. I know that C libraries can be used in C++, but I like to use C++ libraries. Does anyone know a good one to suggest? Best Regards. 回答1: Most

gzip archive with multiple files inside

早过忘川 提交于 2019-12-30 03:11:05
问题 I need to create a gzip archive with multiple files inside, how can I do this without ArchiveEntry available for java.util.zip.GZIPOutputStream class? 回答1: According to the Wikipedia entry on gzip : Although its file format also allows for multiple such streams to be concatenated (zipped files are simply decompressed concatenated as if they were originally one file), gzip is normally used to compress just single files. This is why GZIPOutputStream doesn't support ArchiveEntry . Normally,

Dynamic compression doesn't seem to be used in IIS 7.5

一曲冷凌霜 提交于 2019-12-30 02:45:07
问题 I currently have both static and dynamic compression configured. The static compression is working, however the dynamic compression, when checked through YSlow and Fiddler, is not working. In my applicationHost.config, I have the following settings: <urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" /> <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" maxDiskSpaceUsage="100" minFileSizeForComp="256">

Python - Compress Ascii String

谁都会走 提交于 2019-12-30 02:44:09
问题 I'm looking for a way to compress an ascii-based string, any help? I also need to decompress it. I tried zlib but with no help. What can I do to compress the string into lesser length? code: def compress(request): if request.POST: data = request.POST.get('input') if is_ascii(data): result = zlib.compress(data) return render_to_response('index.html', {'result': result, 'input':data}, context_instance = RequestContext(request)) else: result = "Error, the string is not ascii-based" return render

How to decompress an AES-256 encrypted Zip file?

被刻印的时光 ゝ 提交于 2019-12-30 00:41:22
问题 I am looking for a compression library to use in iPhone application supports decompressing AES 256-bit archives built in Winzip compression utility. Thanks. 回答1: zlib is part of the iPhone sdk and is a well established and free option. If you're using Xcode you can add it to your project by: Right clicking on the Frameworks folder in your project (you can do it elsewhere but that's likely where you want to put it) Select add file Select existing frameworks Select libz.1.2.3.dylib 回答2: Thank