Re: ZStandard (with dictionaries) compression support for TOAST compression - Mailing list pgsql-hackers

From Yura Sokolov
Subject Re: ZStandard (with dictionaries) compression support for TOAST compression
Date
Msg-id 2d57dabc-75d0-4101-9527-cea247ee73b7@postgrespro.ru
Whole thread Raw
In response to Re: ZStandard (with dictionaries) compression support for TOAST compression  (Nikhil Kumar Veldanda <veldanda.nikhilkumar17@gmail.com>)
Responses Re: ZStandard (with dictionaries) compression support for TOAST compression
List pgsql-hackers
06.03.2025 19:29, Nikhil Kumar Veldanda пишет:
> Hi,
> 
>> Overall idea is great.
>>
>> I just want to mention LZ4 also have API to use dictionary. Its dictionary
>> will be as simple as "virtually prepended" text (in contrast to complex
>> ZStd dictionary format).
>>
>> I mean, it would be great if "dictionary" will be common property for
>> different algorithms.
>>
>> On the other hand, zstd have "super fast" mode which is actually a bit
>> faster than LZ4 and compresses a bit better. So may be support for
>> different algos is not essential. (But then we need a way to change
>> compression level to that "super fast" mode.)
>>
> 
> zstd compression level and zstd dictionary size is configurable at
> attribute level using ALTER TABLE. Default zstd level is 3 and dict
> size is 4KB. For super fast mode level can be set to 1.

No. Super-fast mode levels are negative. See parsing "--fast" parameter in
`programs/zstdcli.c` in zstd's repository and definition of ZSTD_minCLevel().

So, to support "super-fast" mode you have to accept negative compression
levels. I didn't check, probably you're already support them?


-------
regards
Yura Sokolov aka funny-falcon



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Next commitfest app release is planned for March 18th
Next
From: Tom Lane
Date:
Subject: Re: Commitfest app release on Feb 17 with many improvements