compression

Curl Error 56 “Failure when receiving data from the peer” while sending .tar.gz File

你说的曾经没有我的故事 提交于 2020-08-27 02:42:04
问题 I have a problem with this CURL call: curl -X POST \ --data-binary '@File01.tar.gz' \ http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02.tar.gz And I receive this error: curl: (56) Failure when receiving data from the peer But if I do this CURL: curl -X POST \ --data-binary '@File01.tar.gz' \ http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02 Its works well. Why is that? 回答1: cURl error 56 can have different reason like:

(Un/De)compress a string in bash?

こ雲淡風輕ζ 提交于 2020-08-02 07:05:21
问题 Is it possible to compress/decompress a string in bash using stdin/stdout ? I tried this but apparently it is not supported ? hey=$(echo "hello world" | gzip -cf) echo $hey # returns a compressed string echo $hey | gzip -cfd gzip: stdin is a multi-part gzip file -- not supported I'm not well versed in linux but I read other compression utilities man pages and couldn't find a solution? 回答1: When you do: hey=$(echo "hello world" | gzip -cf) You don't have same same bytes in variable hey as you

(Un/De)compress a string in bash?

二次信任 提交于 2020-08-02 07:01:49
问题 Is it possible to compress/decompress a string in bash using stdin/stdout ? I tried this but apparently it is not supported ? hey=$(echo "hello world" | gzip -cf) echo $hey # returns a compressed string echo $hey | gzip -cfd gzip: stdin is a multi-part gzip file -- not supported I'm not well versed in linux but I read other compression utilities man pages and couldn't find a solution? 回答1: When you do: hey=$(echo "hello world" | gzip -cf) You don't have same same bytes in variable hey as you

(Un/De)compress a string in bash?

泪湿孤枕 提交于 2020-08-02 07:00:26
问题 Is it possible to compress/decompress a string in bash using stdin/stdout ? I tried this but apparently it is not supported ? hey=$(echo "hello world" | gzip -cf) echo $hey # returns a compressed string echo $hey | gzip -cfd gzip: stdin is a multi-part gzip file -- not supported I'm not well versed in linux but I read other compression utilities man pages and couldn't find a solution? 回答1: When you do: hey=$(echo "hello world" | gzip -cf) You don't have same same bytes in variable hey as you

Compress a file into different parts in python

a 夏天 提交于 2020-07-31 03:20:49
问题 Is it a way in Python (2.7 preferably) to compress a file in several equally-sized .zip files?? The result would be something like: (lets assume 200MB selected and compressing a file of 1100MB) compressed_file.zip.001 (200MB) compressed_file.zip.002 (200MB) compressed_file.zip.003 (200MB) compressed_file.zip.004 (200MB) compressed_file.zip.005 (200MB) compressed_file.zip.006 (100MB) 回答1: I think you can do it in shell command. Somthing like gzip -c /path/to/your/large/file | split -b

Modify files inside zip file, other way

只愿长相守 提交于 2020-07-09 07:58:11
问题 I want to modify some files inside zip file. I tried using the class zip and it works: $zip = new ZipArchive; $res = $zip->open('test.zip'); if ($res === TRUE) { $zip->extractTo('./', 'test.txt'); $fp=fopen("test.txt","a"); fputs($fp,"Hello"."\n"); fclose($fp); $zip->addFile('test.txt'); $zip->close(); unlink ("test.txt"); } Is it possible to not create temp file for modify, extract, repack, etc. Instead, only modify inside of zip file the target file I want change. If it is not possible with

Decoding Z64 (ZB64) string

邮差的信 提交于 2020-07-03 17:03:13
问题 I'm working on breaking down ZPL label definitions generated by NiceLabel label making software. For the most part I don't have to worry about decoding the Z64 because it is just encoded graphics and I don't need to change the underlying data. However I have a line of text that is used as a graphic by the label for some reason probably due to Font's or something. Anyways, the Z64 or ZB64 string is created by compressing the original data using LZ77 and encoding that as Base64 and then