Add compression support for GZ through ZCodec

Desktop / LibreOffice - offtkp [] - 12 June 2022 07:29 UTC

ZCodec uses zlib to deflate. That file has code to allow for compressing to GZ but it's wrapped in defines.

There's places in code where there's need for zlib headers (ie. svx/source/gallery2/codec.cxx:71) and there will be need for gz header compression when EMZ/WMZ/SVGZ export support is added.

Made compression functions care about mbGzLib bool. Also added a SetCompressionMetadata function to set metadata which are otherwise impossible to know (such as filename, which is needed in the header)

Change-Id: Ic01050262b0b15e0632564b139c66656afac4611 Reviewed-on:

932257c50c1d Add compression support for GZ through ZCodec
include/tools/zcodec.hxx | 14 ++++++++++++
tools/source/zcodec/zcodec.cxx | 52 ++++++++++++++++++++++++++++++++++++------
2 files changed, 59 insertions(+), 7 deletions(-)


  • Share