Using Synchronous Interfaces
This section describes how to use synchronous interfaces of the KAELz4 library.
- Use KAELz4 by calling the compression library.Compile and install the software based on Software Installation (KAE 2.0). You can use either of the following methods to link the KAELz4 compression library to the application layer:
- Specify the location for loading libkaelz4.so for the application layer during compilation. The following compilation options are used for linking:
1-Wl,-rpath=/usr/local/kaelz4/lib - Set the environment variable.
1export LD_LIBRARY_PATH=/usr/local/kaelz4/lib:$LD_LIBRARY_PATH
- Specify the location for loading libkaelz4.so for the application layer during compilation. The following compilation options are used for linking:
- Use KAELz4 by executing its binary file.Compile and install the software based on Software Installation (KAE 2.0). You can directly use the /usr/local/kaelz4/bin/lz4 application for decompression.
- Set the environment variable.
1export LD_LIBRARY_PATH=/usr/local/kaelz4/lib:$LD_LIBRARY_PATH
- Use the application to compress files.
1/usr/local/kaelz4/bin/lz4 filename compressed_file
- Use the application to decompress a compressed file.
/usr/local/kaelz4/bin/lz4 -d compressed_file decompressed_file
- Set the environment variable.
Parent topic: Using the KAELz4 Library