Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Best compression for stuffing files (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] FolderItem.CommentMBS and the Finder
Next thread: [MBS] Extracting all icons of a file?


Re: [MBS] MBS Icon Routines redefined?   -   Garth Hjelte
  [MBS] Best compression for stuffing files   -   Marnaud
   Re: [MBS] Best compression for stuffing files   -   Marnaud
   Re: [MBS] Best compression for stuffing files   -   Christian Schmitz
   Re: [MBS] Best compression for stuffing files   -   Marnaud
   Re: [MBS] Best compression for stuffing files   -   Christian Schmitz
   Re: [MBS] Best compression for stuffing files   -   Marnaud
   Re: [MBS] Best compression for stuffing files   -   Christian Schmitz

[MBS] Best compression for stuffing files
Date: 16.11.12 23:49 (Fri, 16 Nov 2012 23:49:58 +0100)
From: Marnaud
Greetings,

I want to stuff files in a single file and am considering compressing them. In the documentation,, I see several options:
CompressBZip2MBS
CompressZLibMBS
CompressLZWMBS

However, I don't know which is best. May I ask for your advice?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Best compression for stuffing files
Date: 17.11.12 15:01 (Sat, 17 Nov 2012 15:01:54 +0100)
From: Marnaud
Le 17 nov. 2012 à 14:55, Christian Schmitz a écrit:

>> Do you happen to know why?
>
> because every compression engine needs some header values to tell itself details about how things are compressed.

Oh, yes. The data isn't bigger, only the header. Well, I assumed that.

>> In one previous app, I used Blowfish compression. I'll add it to the list of available parameters in my app (it's not in the same documentation page, so I missed it).
>
> Blowfish is encryption, not compression.

You're right. Anyway, I'll keep the Blowfish option (my first goal was to encrypt, more than compress).
Thanks.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Best compression for stuffing files
Date: 17.11.12 14:55 (Sat, 17 Nov 2012 14:55:02 +0100)
From: Christian Schmitz

Am 17.11.2012 um 14:50 schrieb Marnaud <<email address removed>>:

>
> Do you happen to know why?

because every compression engine needs some header values to tell itself details about how things are compressed.

> In one previous app, I used Blowfish compression. I'll add it to the list of available parameters in my app (it's not in the same documentation page, so I missed it).

Blowfish is encryption, not compression.

Greetings
Christian

Re: [MBS] Best compression for stuffing files
Date: 17.11.12 14:50 (Sat, 17 Nov 2012 14:50:14 +0100)
From: Marnaud
Le 17 nov. 2012 à 12:16, Christian Schmitz a écrit:

> none is unreliable.

Good to know.

>>> So your app could see which one is the smallest and store that. Sometimes uncompressed is smallest :-)
>>
>> Really? I didn't expected that. What I could do is have 4 variables in code, one for each compression (and for no compression) and always save the one that is the smallest. But that would fill the RAM quickly (when copying big files).
>> Ok, at least I'm going to compare the file sizes. Thank you.
>
> Good. Well a compressed file compressed again is normally bigger.

Do you happen to know why?

In one previous app, I used Blowfish compression. I'll add it to the list of available parameters in my app (it's not in the same documentation page, so I missed it).
Thank you.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Best compression for stuffing files
Date: 17.11.12 12:16 (Sat, 17 Nov 2012 12:16:39 +0100)
From: Christian Schmitz

Am 17.11.2012 um 12:12 schrieb Marnaud <<email address removed>>:

> Le 17 nov. 2012 à 10:15, Christian Schmitz a écrit:
>
>> I'd simply use zlib with level 9.
>> But it'S not wrong to have a flag in your data which says what mode you use like 0 for not compressed, 1 for zlib and 2 for bzip and 3 for lzw.
>
> Ok, thanks. since yesterday, I've added a parameter (argument of my console app) so I could specify the compression (this value is stored in the file, of course). Ideally, I'd like to avoid “bad” compression methods which would sometimes fail (like one with a reputation of not always decompressing right). Are there unreliable compressions in these above? Or is it always more risked to use compression?

none is unreliable.

>> So your app could see which one is the smallest and store that. Sometimes uncompressed is smallest :-)
>
> Really? I didn't expected that. What I could do is have 4 variables in code, one for each compression (and for no compression) and always save the one that is the smallest. But that would fill the RAM quickly (when copying big files).
> Ok, at least I'm going to compare the file sizes. Thank you.

Good. Well a compressed file compressed again is normally bigger.

Greetings
Christian

--

Re: [MBS] Best compression for stuffing files
Date: 17.11.12 12:12 (Sat, 17 Nov 2012 12:12:22 +0100)
From: Marnaud
Le 17 nov. 2012 à 10:15, Christian Schmitz a écrit:

> I'd simply use zlib with level 9.
> But it'S not wrong to have a flag in your data which says what mode you use like 0 for not compressed, 1 for zlib and 2 for bzip and 3 for lzw.

Ok, thanks. since yesterday, I've added a parameter (argument of my console app) so I could specify the compression (this value is stored in the file, of course). Ideally, I'd like to avoid “bad” compression methods which would sometimes fail (like one with a reputation of not always decompressing right). Are there unreliable compressions in these above? Or is it always more risked to use compression?

> So your app could see which one is the smallest and store that. Sometimes uncompressed is smallest :-)

Really? I didn't expected that. What I could do is have 4 variables in code, one for each compression (and for no compression) and always save the one that is the smallest. But that would fill the RAM quickly (when copying big files).
Ok, at least I'm going to compare the file sizes. Thank you.
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Best compression for stuffing files
Date: 17.11.12 10:15 (Sat, 17 Nov 2012 10:15:15 +0100)
From: Christian Schmitz

Am 16.11.2012 um 23:49 schrieb Marnaud <<email address removed>>:

> Greetings,
>
> I want to stuff files in a single file and am considering compressing them. In the documentation,, I see several options:
> CompressBZip2MBS
> CompressZLibMBS
> CompressLZWMBS
>
> However, I don't know which is best. May I ask for your advice?

I'd simply use zlib with level 9.
But it'S not wrong to have a flag in your data which says what mode you use like 0 for not compressed, 1 for zlib and 2 for bzip and 3 for lzw.

So your app could see which one is the smallest and store that. Sometimes uncompressed is smallest :-)

Greetings
Christian