You are not logged in.
Pages: 1
Hi,
Can you add LZMA compression ?
Could anyone recommend solution without .dll ?
I want LZMA equivalent of
CompressDeflate(data,true);
Offline
@ab
For JSON txt data: Fast/fastest method it compress text much better than zip/gzip at similar speed or even faster.
(I have tested 7-zip)
Last edited by Greg0r (2019-04-01 17:37:04)
Offline
IMHO LZMA is too slow at compressing data for communication, and it could be easily blocked by most proxies, since "Accept-Encoding: lzma" is not supported anywhere (but Opera browser?).
Sample txt UTF8 file:
Oryginal- 4280KB
LZMA - Fastest 273KB
ZIP - normal - 1291KB
Speed: Both very similar.
I don't see the reason to choose ZIP.
LZMA eats it in every aspect.
Does anyone know good way for strings data LZMA compression/decomp in Delphi?
Last edited by Greg0r (2019-04-02 15:17:44)
Offline
gzip/deflate is used everywhere in the Web, all http clients/servers/proxies support it, So for compatibility reasons this is best choice. In any case most of JSON responses is not so huge (at last should be) to take in account difference between compression rate.
Offline
You all guys are right totally but I'm afraid my needs are different I post frequent ~100 kb Jsons with txt data
For me it make difference if server store 50 or 30% of oryginal size.
Also I have noticed that most of even programmers doesn't know about blazing fast LZMA in fastest method compression
I agree that in normal it unusable slow for server purposes.
LZMA normal and fastest are not comparable when comes to speed.
@mpv do you know any good component or way to compress json string with LZMA in Delphi (10.2, 10.3)
Last edited by Greg0r (2019-04-03 14:28:29)
Offline
Maybe you should test brotli or gzip with your json file. Those are also supported in every browser while I guess LZMA cannot be used in any browser.
Offline
I dont need browser support, just typical storage compressed data, LZMA fastest could be the best there
Offline
Hi,
InnoSetup has built-in support for LZMA file compression using a dll. Have a look at https://github.com/jrsoftware/issrc/blo … s/LZMA.pas
Another option would be to go for translating headers and directly linking the C .obj file.
Offline
> Another option would be to go for translating headers and directly linking the C .obj file.
If standard 7z (uses LZMA/LZMA2) solution is fine then it's much easier to link to 7z COM interface in it's dll.
Offline
Pages: 1