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

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?

Related

Compress a folder into a single file using lz4 command line

I need to compress the all of the contents of a directory into a single lz4 archive, i couldn't figure out a way to do that. I already have read all the available parameters, still no success. Kindly suggest me how can i achieve this.
Things like lz4, gzip, bzip2, and xz simply compress a stream of bytes. You need another utility, like tar, to convert a set of directories and files into a stream of bytes. The output of tar is then fed to the compressor. That's why you see archives with names like tar.gz or tar.xz.
How to use tar with lz4?

How to compress a folder with brotli command line (version 0.5.2)?

I am trying to compress a folder with Brotli(0.5.2) command line on Ubuntu 15.10
~/brotli-0.5.2$ ./bro -f -i ./dec/ -o folder.br
Then get error message:
failed to read input
Does anyone know how to compress folder with brotli?
Thanks.
brotli can only compress a file or a single stream of data. Just like gzip, xz, lzip, etc. To compress a directory, you would do what all archivers do, which is to convert the information in the directory into a single stream of data and write that to a file.
You did not provide a clue to your operating system in the question or tags, but on Unix-like systems, tar is used to take a directory and all of its contents in files, subdirectories, symbolic links, etc., and convert those to a single stream of data. Then you can use bro on that, as you would use any other compressor gzip, xz, etc. on it.

Amazon S3 Compressing Files?

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

how do i add/remove specific file in zip file with zlib?

how do i add/remove specific file in zip file with zlib?
there are data.zip.
it has 1.bmp and 2.bmp.
T want to add 3.bmp and remove 2.bmp.
how do i do?
Except deleting data.zip and compress 1/3.bmp to data.zip.
zlib does not support ZIP files by itself, only DEFLATE streams. ZIP uses DEFLATE, but it is not the same. You need a library such as libzip, zziplib, minizip, etc which support ZIP files, most of which in turn use zlib.

Blank acoustic fingerprint when using Chromaprint

I am trying to differentiate between multiple wav files using acoustic fingerprinting. I am using Chromaprint from AcoustID. I am using 32 bit windows. I have downloaded the file fpcalc.exe and am trying to run it on multiple wav files. The problem is, it is generating blank FINGERPRINT for those wav files.
I am running the command
fpcalc.exe -raw <FILENAME>.wav
The files are in wav format and the size of the files is 1 SEC. I am running the same command on bigger files, then the FINGERPRINT is working fine.
Any pointers?
The Chromaprint library only works for larger files, I think the files should have at least 10 seconds to fingerprint.
Maybe you should look for alternatives like Python and Ruby who have libraries to fingerprint small audio files (if you search a bit).
You can use the gem that I made for wav files:
https://rubygems.org/gems/audio-fingerprint