Recent

Author Topic: How do you control the level of compression with TZipper?  (Read 2888 times)

Akira1364

  • Hero Member
  • *****
  • Posts: 561
How do you control the level of compression with TZipper?
« on: January 22, 2016, 08:05:41 pm »
For example, zipping a 2 GB mp4 video file with TZipper results in a 1.99 GB archive, regardless of the archive extension I specifiy. Most people would agree this is not "enough" compression. Examining the class methods for TZipper doesn't show me any obvious way to make it compress more or less... what is the best way to do this?

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1059
Re: How do you control the level of compression with TZipper?
« Reply #1 on: January 22, 2016, 08:08:19 pm »
mp4 is already compressed, that's why you get such bad results. No amount of tweaking zip compression settings is going to change that.

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: How do you control the level of compression with TZipper?
« Reply #2 on: January 23, 2016, 03:58:15 pm »
If your mp4 needs to be smaller, you can always re-code it with less quality.
But that is about it. The small amount of compression you get is from the meta-data. The actual video/audio data is already supercompressed.
2G looks like full HD for a feature length movie. Recode 1080p (full HD) to 720p(HD broadcast) and you already can expect more than 75% reduction if re-coding is acceptable.
Re-code 720 to 480 and it is still watchable.
« Last Edit: January 23, 2016, 04:13:50 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: How do you control the level of compression with TZipper?
« Reply #3 on: January 24, 2016, 02:15:05 am »
MP4 was just an example... what I said in my original post seems to be true for literally any file format, even text files.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: How do you control the level of compression with TZipper?
« Reply #4 on: January 24, 2016, 02:35:36 am »
Check the Entries property. Each item in there has a compressionlevel property where you can define the (surprise, surprise) compression level of the item compressed, this way each item can have its own level instead of a single level for everything. A property for the default compression level for new items could be helpful I guess, especially since there are no overloaded methods to add files and specify a compression level hiding the property in effect for new users.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018