compression

Can we ZIP/Unzip files larger than 4GB using .Net 4.5 libraries?

我只是一个虾纸丫 提交于 2019-12-02 10:27:17
We have an original zip library which uses the SharpZipLib and .NET 2.0. We need to research what is now possible in .NET 4.5 using System.IO.Compression and System.IO.Compression.ZipArchive. Should we use .NET 4.5 libraries or use a 3rd party open source library? Also, we need to be able to zip/unzip files larger than 4GB. Samples, blogs, any help is welcomed. Thank you Suresh 4GB is the maximum addressible size for a 32-bit pointer, hence it will not work for larger file. But you can try Zip64 which will work for larger files. This post might help you. Hope this will help! Thanks Suresh 3rd

Compression and Decompression of Argument Strings in Java [closed]

纵然是瞬间 提交于 2019-12-02 09:49:49
I'm having trouble coming up with a way too decompress a String in Java. This is a basic Java class I'm taking so it only requires basic commands, nothing too fancy. The objective it to able to type C:\>java Compress -c aaaabbbbbcc in the command prompt and it will print a4b5c2 (like it is compress the argument string). The other objective is to type C:\>java Compress -d a5b7c4 and it will print aaaaabbbbbbbcccc (like it will decompress the argument String). The decompression is the issue I'm having. Here is my code, any help I get is much appreciated. import java.util.*; public class Compress

ZLib decompression

坚强是说给别人听的谎言 提交于 2019-12-02 09:47:53
问题 I am trying to compress data using the zlib .net library. Regardless of the content of the uncompressed string I only seem to get two bytes of data in the raw[]. { string uncompressed = "1234567890"; byte[] data = UTF8Encoding.Default.GetBytes(uncompressed); MemoryStream input = new MemoryStream(data); MemoryStream output = new MemoryStream(); Stream outZStream = new ZOutputStream(output,zlibConst.Z_DEFAULT_COMPRESSION); CopyStream(input, outZStream); output.Seek(0, SeekOrigin.Begin); byte[]

ZLIB uncompress

≡放荡痞女 提交于 2019-12-02 09:03:39
I've coded a small application that should uncompress data encoded in the gzip/deflate format. In order to accomplish this,I'm using the ZLIB library, using the uncompress function. The problem is that the function doesn't work! In orher words, data is not uncompressed! I post here the code: int (*decompress)(PBYTE,PULONG,PBYTE,ULONG); void DecodeData(PBYTE data,ULONG dataSize){ LoadLibrary("C:\\zlib1.dll"); decompress=(int(*)(PBYTE,PULONG,PBYTE,ULONG))GetProcAddress( GetModuleHandle("zlib1.dll"),"uncompress"); // Yeah I know the size is hardcoded and it's not right, but it's just a test, //

MPEG Coding GOP

此生再无相见时 提交于 2019-12-02 08:56:01
I am trying to figure out how GOP works Consider the uncoded frame sequence: I B B P B B P B B P B B I B B P B B P B I understand what The N(GOP) is, it's 12 if I am counting from Iframe to Iframe. I know what the predicted span is, it's 2. What is the reordered sequence for decoding for these frames? How would you increase random access? How would you increase compression? How do errors creep in? could someone explain it to me the 4 questions. thank you Check out this MPEG compression FAQ , particularly the section "Q. So is each frame predicted from the last frame?" for a more detailed

Compressing frames inside an AVI video

拜拜、爱过 提交于 2019-12-02 07:26:03
I've built a Windows Phone class to convert some WriteableBitmap into a AVI Full Frame (Uncompressed). Videos are really huge. Is there a simple codec implementation existing, like a codec that just zip images, or something that is making a next/previous XOR then zip it in jpeg? Windows Phone doesn't allow any unsafe code and most DLL cannot be wrapped into a C# WP library. So that's why I'm coding something from scratch. Note that I'm more efficient at coding from scratch than in studying C++ existing sources (I'm not a C++ coder), so what I'm searching is infos about a compressed AVI format

how to get number of compressed bytes written, while using gz lib, in c/c++?

痴心易碎 提交于 2019-12-02 06:29:53
问题 I have a question on zlib . How can I know the number of compressed bytes written? I am using gzwrite(...) . As we know it returns the number of uncompressed (actual) bytes written. Should I use some other API instead of gzwrite() ? What I am doing, - I have a .gz output file. I keep writing to the file when I have some content available. I also want to track the file so that it does not cross a certain size. I do not want to use stat() linux API as my writing is very frequent. Suggestions?

Create zip file in memory from bytes (text with arbitrary encoding)

自作多情 提交于 2019-12-02 05:06:43
问题 The application i'm developing needs to compress xml files into zip files and send them through http requests to a web service. As I dont need to keep the zip files, i'm just performing the compression in memory. The web service is denying my requests because the zip files are apparently malformed. I know there is a solution in this question which works perfectly, but it uses a StreamWriter . My problem with that solution is that StreamWriter requires an encoding or assumes UTF-8 , and I do

Mule Zip File and send zipped file towards FTP server

六眼飞鱼酱① 提交于 2019-12-02 04:53:48
问题 I know Mule has great support for gzip compression of data using the element. However the client now wants zip compression since the file has to be placed on an FTP as a zip compressed file :( I encounter difficulties in mule with following scenario: I created a Spring bean where a file comes in. I want to compress this file using the ZipOutputStream class and pass it towards our ftp. This is my flow configuration: <flow name="testFlow" initialState="stopped"> <file:inbound-endpoint path="$

Zlib deflated input is larger than original input string of chars?

淺唱寂寞╮ 提交于 2019-12-02 04:40:27
I'm a bit confused by zlib compressing an input of a string of type char . Below I have the output from the code as posted and what I noticed was that the input string was shorter in bytes compared to the output. The uncompressed size was 8 bytes and the compressed is 12 ? Am I not seeing this correctly instead? Here's the code. #include <stdio.h> #include <string.h> #include <assert.h> #include <iostream> #include "zlib.h" void print( char *array, int length) { for(int index = 0; index < length; index++) std::cout<<array[index]; std::cout<<std::endl; } void clear( char *array, int length) {