How to unzip journal file?
Hi!
Currently, I'm working on a script using %SYS.Journal API.
My journal files are compressed, following the documentation the compression is zstd.
I tried to unzip a file with zstd tool, ex:
apt-get update
apt-get install zstd
zstd -d 20230806.001z -o 20230806.001
20230806.001z : 92.03% (909312 => 836859 bytes, 20230806.001) Unfortunately, the unzipped file is invalid:
Write##class(%SYS.Journal.File).IsValidJournal("/usr/irissys/mgr/journal/20230806.001")The size of the unzipped file is greater than the compressed file, it's weird...
Is there a recommended tool to decompress a journal file?
%SYS.Journal API works fine with compressed files but I need to test the performance.
Maybe it's faster if the file is unzipped before (or not), that's the performance test I want to do.
Thank you!
Product version: IRIS 2023.2
$ZV: IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2023.2 (Build 202U) Thu May 18 2023 11:16:51 EDT
Discussion (2)0
Comments
How about Decompress() method in %SYS.Journal.File class?
set f1="C:\InterSystems\IRISHealth\mgr\journal\20230807.001z"set f2="C:\InterSystems\IRISHealth\mgr\journal\test20230807.001"write##class(%SYS.Journal.File).Decompress(f1,f2)And below method returns 1.
USER>Write##class(%SYS.Journal.File).IsValidJournal(f2)
1