Amazon S3 Compressing Files? - amazon-web-services

A few years ago I uploaded some photos to S3. When I try to retrieve them today, the files seem to be corrupted, as I am unable to open them in the browser or with a photo editor. Looking at the file properties, it seems the files have been compressed, as there is a x-amz-meta-compression-algorithm key with the value zlib and a x-amz-meta-compression-original-size with a value of 53890. However, the size of the file on S3 is 53761. I did not compress the files before uploading them. How can I uncompress these files?

Did you download the file and determine its type using file command?
If it is indeed zlib compressed or if file command says data, try the accepted answer in this link: https://unix.stackexchange.com/questions/22834/how-to-uncompress-zlib-data-in-unix
printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" |cat - zlib.raw |gzip -dc > myfile

Related

how do you extract files from a mhtml file

so i was have a MHTML file someone gave me, i looked it up figured out what it holdsm it holds all the assets of a webpage, how do i decompress this (i use linix just incase if you need to know) i dont know if i would just run a script on my device or would use a website to do it for me (either works)
i am hoping do decompress a mhtml file using either shell commands or a website

Compressing existing mail files, readable in Roundcube (dovecot, centos)

Roundcube can read compressed files without the extension c.f. example below:
-rwxr-x--- 1 vmail vmail 5170815 Jun 20 10:14 1529504317.M895396P3597.mailstore-clone,S=7142774,W=7235655:2,S
Using the file command on the same file returns:
1529504317.M895396P3597.mailstore-clone,S=7142774,W=7235655:2,S: gzip compressed data, from Unix
New files are being compressed using zlib plugin, and I need to compress all the remaining old mail files so they will be still readable in Roundcube. Is it possible to somehow activate zlib plugin on existing mails already in the inbox?

How to compress a folder to .ngz

I like to think of myself as reasonably computer and google literate (I'm OK ar searching the web). However I've recently had the need to compress into .ngz format and for the life of me I can't find a program that will allow me to compress into that format. I can open the files with 7zip, but it wont allow me to create an ngz archive. Any help appreciated.
It is likely a gzipped cpio file. Try cpio -i < whatever.ngz. It will automatically recognize the gzip compression and decompress it, as well as extract the archive. cpio -oz < list > archive.ngz will make a new archive given the list of files in list.

Open a zip file and move the file in another zip in c++?

I wanted to open a zip file (mod.zip) and move the file inside, to another zip file (minecraft.zip) and owerwrite the file with same names.I hope you understand because im not english.
I dont know if i can open zip files or i need libraries
I would recommend 7zip SDK, it lets you zip and unzip things in .7z and .zip and many other formats

Metadata of avi files

I used the od tool in Linux to look the metadata of mp3 files and avi files by using the command
od -c filename.avi
For mp3 files it is showing all the fields very properly even in sequence. But for avi files it is not showing the metadata fields.
Whether is there is any difference in the way the metadata fields are stored in avi and mp3 files?
Can somebody tell me some good way of extracting metadata fields of avi files.
GNU lib extractor might be good for what you're looking for:
http://www.gnu.org/software/libextractor/