compression

C# SharpZipLib strips irrelevant directory names

放肆的年华 提交于 2019-12-23 17:30:57
问题 I am using SharpZipLib to zip up a folder with subdirectories and this is working fine. What I would like to do is strip off the parents directories of the first child file so the whole structure that is irrelevant isn't carried forth... Example: c:\a\b\c\d\e\f\g\h\file1.txt c:\a\b\c\d\e\f\g\h\file2.txt c:\a\b\c\d\e\f\g\h\i\file1.txt c:\a\b\c\d\e\f\g\h\i\file2.txt It should end up like this: file1.txt file2.txt i\file1.txt i\file2.txt How can I do this? Here is the code I have so far: ZipFile

url text compression (not shortening) and storing in mysql

隐身守侯 提交于 2019-12-23 16:58:45
问题 I have url table in mysql which has only two fields id and varchar(255) for url. There are currently more than 50 million urls there and my boss has just given my clue about the expansion of our current project which will result in more urls to be added in that url table and expected numbers are well around 150 million in the mid of the next year. Currently database size is about 6GB so I can safely say that if things are left same way then it will cross 20GB which is not good. So, I am

DICOM File compression

て烟熏妆下的殇ゞ 提交于 2019-12-23 12:58:06
问题 My line of work requires the use of DICOM files. Each DICOM file constitutes many .dcm files in a single directory. I am required to send these files over the network, a process which is somewhat so due to the massive size of the files. I am also a programmer and I was wondering what is the ideal way to compress such files? I'm talking about a compression that will be made on the local computer and later decompressed on the destination computer (namely the compression is solely for speeding

How to know when the output buffer is too small when decompressing with LZ4?

…衆ロ難τιáo~ 提交于 2019-12-23 12:54:11
问题 The documentation of LZ4_decompress_safe says: /*! LZ4_decompress_safe() : compressedSize : is the precise full size of the compressed block. maxDecompressedSize : is the size of destination buffer, which must be already allocated. return : the number of bytes decompressed into destination buffer (necessarily <= maxDecompressedSize) If destination buffer is not large enough, decoding will stop and output an error code (<0). If the source stream is detected malformed, the function will stop

Java Compression Library To Support Deflate64

橙三吉。 提交于 2019-12-23 12:41:59
问题 Looking for an alternative compression java library to Apache Commons Compress (https://commons.apache.org/proper/commons-compress/). Commons Compress throws an error when trying to read a zip entry that was compressed using "ENHANCED_DEFLATED" which is deflate64. Here is sample excerpt that throws the exception. public void doRecurseZip(File inputFile) throws IOException{ ZipFile srcZip = null; srcZip = new ZipFile(inputFile); final Enumeration<ZipArchiveEntry> entries = srcZip.getEntries();

String Compression / Decompression of data to be sent over the network [closed]

巧了我就是萌 提交于 2019-12-23 12:13:26
问题 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 am looking for a string compression method in C# which I can run on the data String before I write it to the network socket? I am fairly new to any sort of compression hence the reason I am looking for some advice / guidance here. WHY? This is needed in an application where it runs on a Server which constantly

Compression libraries for Ruby?

回眸只為那壹抹淺笑 提交于 2019-12-23 10:57:53
问题 Are there any open-source compression/decomp libraries available for Ruby? Has anyone implemented LZW? Or, are there any open-source libraries that use a compression component which could conceivably be extracted for independent use? EDIT -- thanks for the answers! I should have mentioned that what I have to compress are long strings that will only reside in a database (I won't be compressing files). Also, it would be ideal if whatever library could do this had an equivalent implementation in

Compressing multiple JavaScript files with YUIcompressor?

浪尽此生 提交于 2019-12-23 09:46:26
问题 I'm trying to compress multiple JS files using the YUI Compressor. I think that I'm getting the syntax wrong. I want to compress all files in a directory that start with at_ . However, when YUI Compressor runs, I find that YUI Compressor has placed only the compressed version of one file in the output. To be specific, suppose I have three files: at_1.js, at_2.js, and at_3.js. I would like the compressed output of all three js files in at_min.js I'm using the following syntax: java -jar c:

Bz2 Decompression in C#

社会主义新天地 提交于 2019-12-23 09:37:40
问题 Im looking for an example of how to decompress a bz2 file. I download the file via a control flow in an SSIS package, I would like to kick off a Script Task using some C# code to decompress the downloaded bz2 file. It doesn't seem that the decompression library that comes with .net handles bz2 files. Could someone show me an implimentation that could? or direct me to an example of decompressing a bz2 file to a specified folder? 回答1: 7-zip comes with bzip2 support (and many many more formats)

Free C/C++ based zip/zip64 library?

旧街凉风 提交于 2019-12-23 09:33:21
问题 After having false starts with poco's zip and minizip (both have issues, minizip can't decompress files larger than 2gb and poco zip corrupts any zip file larger than 2 gigs it compresses) I was wondering if there was anything else left? So any suggestions for a C++ archive library that can handle zip AND zip64? 回答1: 7-zip handles both, as far as I could tell from a quick glance at their source code. It's also LGPL, which should allow its use in a closed source app. 回答2: Well there is the all