-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run SZ API code #114
Comments
SZ command accepts only binary format files instead of txt files.
In fact, txt file is not a dense format to store the data because it uses
strings essentially to store that information.
In other words, if you just convert all the text strings to the binary
representation, you will see reduced data size.
FYI, you can use qcat to do the format conversion between the txt file and
binary file.
https://github.com/szcompressor/qcat
After installing qcat and building it, you'll find some executables like
'convertTxtToBytesFloat' in the examples/ directory. This is what you can
use to do the conversion. convertTxtToBytesFloat will read a txt file in
which each line represents a data value and the output will be a binary
file containing those data values in float type. Then, you can feed the
binary file to SZ for a further compression.
Best,
Sheng
…On Fri, Aug 4, 2023 at 6:55 AM clodiamery ***@***.***> wrote:
Hello,
I install SZ in this way
1.
mkdir build && cd build
2.
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=[INSTALL_DIR]
3.
make
4.
make install
Then
cd example .
I need to use SZ API in my project.
If I use this command to compress the .dat file, it works correctly :
./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.dat 8 8 128
Or
./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.dat 8192
My problem I can't use txt file as input, if I use
./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.txt 8 8 128
I got on Failed to open input file
Error: file testdata/x86/testdouble_8_8_128.txt 8 8 128 cannot be read.
Now I have two question:
1- How can I use txt file as input?
2- How can run (.c) program?
because I need to run (testdouble_compress.c) as .c file
Any help please?
Thanks,
—
Reply to this email directly, view it on GitHub
<#114>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACK3KSIIAIQGCCQRWKDIGQLXTTPJFANCNFSM6AAAAAA3EDHF5Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks Sheng, I put the code writeCompressedDatatoTxt.c in example folder I have no lib folder inside SZ directory why? how can build it correctly ? |
Well. You need to modify Makefile.am. The corresponding knowledge/skill is automake (or autotool). You can learn it from google. The basic steps are as follows:
aclocal |
Hello,
I install SZ in this way
Then
cd example .
I need to use SZ API in my project.
If I use this command to compress the .dat file, it works correctly :
./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.dat 8 8 128
Or
./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.dat 8192
My problem I can't use txt file as input, if I use
./testdouble_compress sz.config testdata/x86/testdouble_8_8_128.txt 8 8 128
I got on Failed to open input file
Error: file testdata/x86/testdouble_8_8_128.txt 8 8 128 cannot be read.
Now I have two question:
1- How can I use txt file as input?
2- How can run (.c) program?
because I need to run (testdouble_compress.c) as .c file
Any help please?
Thanks,
The text was updated successfully, but these errors were encountered: