compression

How to decode .lzo_deflat file?

喜欢而已 提交于 2019-12-25 02:33:27
问题 does anyone have either a command-line or python library that can decode a .lzo_deflate file? These file formats are used by Hadoop, for example. 回答1: Google for Python LZO, and check your linux distribution for lzop : Many Linux distributions (e.g. Debian, Ubuntu) will have this: liblzo2-2 - data compression library liblzo2-dev - data compression library (development files) lzop - fast compression program python-lzo - Python bindings for the LZO data compression library 回答2: For the windows'

Any way to compress a 256 bytes “MD5-like” string into 160 bytes or less?

笑着哭i 提交于 2019-12-25 02:19:19
问题 I intend to send such a string (256bytes): 633a88d35a0f8fd172bd21158a03a8bb17ddc0acc6edb8ae19a9dbd1aa855b75319e540910fb70cf7bb51d608219dd4b387623f94262705a9c2c19332240e2a6d696d4cb896abf0101afae1aeebf3d6299675e0e67904e7a544de9e3e65fb9def9b0b047fb57a0b742226d602d386d9e2fe176a88837eddd0c77d6911d386c2e via SMS through android, and the content should be within 1 message. As you may know, the SMS has a limit of 160 bytes per message, I have tried using gzip in Java and then encode the compressed

From Default Perl on OSX, How To Unzip To Folder?

纵饮孤独 提交于 2019-12-25 01:46:35
问题 I'm trying to avoid having to include other libraries and keep this simple on OSX, using the default Perl that ships with OSX since Snow Leopard . I'm also trying to avoid shelling out to Bash to run the unzip. I found this example almost works, but dies on this line: my $fh = IO::File->new($destfile, "w") or die "Couldn't write to $destfile: $!"; with this error: Couldn't write to /tmp/mytest/Install Norton Security.localized//: Is a directory at test7.pl line 42. Previously, I zipped the

compressed file format for Iphone

痞子三分冷 提交于 2019-12-25 01:44:18
问题 i am new to iPhone i want to ask that what is the compressed file format which is supported on iPhone. Also how can extract this file programmatically. 回答1: The following open source project at Google Code definitely works. I've used it in 2 apps myself: http://code.google.com/p/ziparchive/ and the following discussion shows some example usage: http://www.iphonedevsdk.com/forum/iphone-sdk-development/7615-simple-objective-c-class-zip-unzip-zip-format-files.html 来源: https://stackoverflow.com

Using gzip as a reducer produces corrupt data

混江龙づ霸主 提交于 2019-12-25 01:28:49
问题 When I run hadoop streaming like this: hadoop jar /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/hadoop-streaming.jar -Dmapred.reduce.tasks=16 -input foo -output bar -mapper "python zot.py" -reducer gzip I get 16 files in the output directory which are, alas, corrupt: $ hadoop fs -get bar/part-00012 $ file part-00012 gzip compressed data, from Unix $ cat part-00012 | gunzip >/dev/null gzip: stdin: invalid compressed data--format violated when I inspect the output of cat part-00012 | gunzip

How to compress an .APK file say by Winrar(.rar) and then convert it back to .APK?

若如初见. 提交于 2019-12-24 22:25:06
问题 As you all know a disadvantage of Xamarin Forms apps is their huge size. Though I went through different scenarios for reducing app size such as Linking and using Proguard, my Android APK size is still so high(about 30 MB). The thing is when I compressed this apk by Winrar the size got to about 11 MB. I renamed this compressed .rar file to .apk file but when I tried to install this file I got the message: "There was a problem parsing the package". So my question is is there any mechanism to

Lossy compression of numpy array (image, uint8) in memory

泄露秘密 提交于 2019-12-24 21:53:17
问题 I am trying to load a data set of 1.000.000 images into memory. As standard numpy arrays (uint8) all images combined fill around 100 GB of RAM, but I need to get this down to < 50 GB while still being able to quickly read the images back into numpy (that's the whole point of keeping everything in memory). Lossless compression like blosc only reduces file size by around 10%, so I went to JPEG compression. Minimum example: import io from PIL import Image numpy_array = (255 * np.random.rand(256,

How do I compress an image with Run-Length Encoding using C#?

断了今生、忘了曾经 提交于 2019-12-24 18:17:46
问题 How do I compress an image with Run-Length Encoding using C#? Are there any available libraries to support this? Does Run-Length Encoding only work on bitmapped images? If so, How will I convert image types to bitmap using C#? I'd also like to ask what's their resulting file type after this, will they retain their file type or will they have a new one? 回答1: I know this is an old question, but it is one of the few things that comes up for RLE compression in C# on Google search. For someone

How to develop incremental compression/decompression in LZMA SDK?

廉价感情. 提交于 2019-12-24 17:43:40
问题 I'm using the LZMA SDK for file compression/decompression (LZMA is the default algorithm used in 7-zip) under Windows 7 (64 bits). The sdk can be found here (source code) http://7-zip.org/sdk.html To compress/decompress the file i can use the following command. ./LzmaUtil.exe e input.elf output.elf ./LzmaUtil.exe d output.elf input.elf I'm using CAN BUS (must use it : client spec) to flash the binary file from the HOST to the MCU. In order to speed up the flashing process. I want to make

After encoding data size is increasing

一曲冷凌霜 提交于 2019-12-24 16:36:56
问题 I am having a text data in XML format and it's length is around 816814 bytes. It contains some image data as well as some text data. We are using ZLIB algorithm for compressing and after compressing, the compressed data length is 487239 bytes. After compressing we are encoding data using BASE64Encoder. But after encoding the compressed data, size is increasing and length of encoded data is 666748 bytes. Why, after encoding data size is increasing? Is there any other best encoding techniques?