mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +08:00
Change optimizer to FlateEncoding - seems more robust
This commit is contained in:
parent
5fb48797fb
commit
54b47021e4
@ -26,8 +26,7 @@ func (c *CompressStreams) Optimize(objects []core.PdfObject) (optimizedObjects [
|
||||
if _, found := core.GetName(stream.PdfObjectDictionary.Get("Filter")); found {
|
||||
continue
|
||||
}
|
||||
encoder := core.NewLZWEncoder()
|
||||
encoder.EarlyChange = 0
|
||||
encoder := core.NewFlateEncoder() // Most mainstream compressor and probably most robust.
|
||||
var data []byte
|
||||
data, err = encoder.EncodeBytes(stream.Stream)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user