LZS221-C

LZS221-C Datasheet


LZS221-C Version 6 Data Compression Software

Part Datasheet
LZS221-C LZS221-C LZS221-C (pdf)
PDF Datasheet Preview
6+ 7 & 9HUVLRQ 'DWD &RPSUHVVLRQ 6RIWZDUH

LZS221-C Version 6 Data Compression Software

Hi/fnTM supplies two of the Internet’s most important raw materials compression and encryption. Hi/fn is also the world’s first company to put both on a single chip, creating a processor that performs compression and encryption at a faster speed than a conventional CPU alone could handle, and for much less than the cost of a Pentium or comparable processor.

As of October 1, 1998, our address is:

Hi/fn, Inc. 750 University Avenue Los Gatos, CA 95032 Tel 408-399-3500 Fax 408-399-3501

Hi/fn Applications Support Hotline 408-399-3544

Disclaimer

Hi/fn reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice, and advises its customers to obtain the latest version of relevant information to verify, before placing orders, that the information being relied on is current.

Hi/fn warrants performance of its semiconductor products and related software to the specifications applicable at the time of sale in accordance with Hi/fn's standard warranty. Testing and other quality control techniques are utilized to the extent Hi/fn deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements.

Certain applications using semiconductor products may involve potential risks of death, personal injury, or severe property or environmental damage "Critical Applications" .

HI/FN SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS.

Inclusion of Hi/fn products in such critical applications is understood to be fully at the risk of the customer. Questions concerning potential risk applications should be directed to Hi/fn through a local sales office.

In order to minimize risks associated with the customer's applications, adequate design and operating safeguards should be provided by the customer to minimize inherent or procedural hazards.

Hi/fn does not warrant that its products are free from infringement of any patents, copyrights or other proprietary rights of third parties. In no event shall Hi/fn be liable for any special, incidental or consequential damages arising from infringement or alleged infringement of any patents, copyrights or other third party intellectual property rights.
“Typical” parameters can and do vary in different applications. All operating parameters, including “Typicals,” must be validated for each customer application by customer’s technical experts.

The use of this product may require a license from Motorola. A license agreement for the right to use Motorola patents may be obtained through Hi/fn or directly from Motorola.

DS-0006-00 9/98 1997-1998 by Hi/fn, Inc., including one or more U.S. patents No. 4,701,745, 5,003,307, 5,016,009, 5,126,739, 5,146,221, 5,414,425, 5,414,850, 5,463,390, 5,506,580, Other patents pending.

DS-0006-00 DATA SHEET

LZS221-C Version 6 Data Compression Software

Table of Contents
1 Product Description 2 LZS221-C Files 3 Function 4 Compile-Time Options
LZS_C_FOOTPRINT Byte Ordering 5 Constants, Types, & Bits 6 7 Hi/fn LZS 8 Compression & Decompression Histories History Maintenance 9 10 11 LZS_C_Compress 12 13 14

Figures

Figure Typical speed Figure Effect of performance parameters Figure LZS_Compress flags parameter Figure LZS_C_Compress example pseudocode Figure LZS_C_Compress return value Figure LZS_C_Decompress flags parameter Figure LZS_C_Decompress pseudocode example Figure LZS_C_Decompress return value

DATA SHEET DS-0006-00

LZS221-C Version 6 Data Compression Software THIS PAGE INTENTIONALLY BLANK

DS-0006-00 DATA SHEET

LZS221-C Version 6 Data Compression Software

Product Description

The LZS221-C Data Compression Software Library provides a processor independent software implementation of the Hi/fn algorithm in a C source code
format. The software is compatible with ANSI C.

Figure 1 on page 9 illustrates the compression speed of this library.

This library supports the simultaneous use of multiple compression and decompression histories. Each history is completely independent of other histories. In addition, this software is re-entrant.

LZS221-C is fully compatible with Hi/fn’s data compression compressor chips along with the multi-history features. This library is also compatible with other members of the LZS221 software family. Files compressed or decompressed with hardware or software may be compressed or decompressed interchangeably with hardware or software.

Assembly language optimized implementations for some specific processors are also available. Consult Hi/fn for more information.
• Hi/fn LZS compression format
• Multiple history support
• Adjustable compression speed vs. ratio
• High performance
• Cross compatible with other Hi/fn LZS compression software and hardware
• Interface similar to Version 4

New in version 6
• Special faster modes
• Flexible memory requirements
• Able to process fragments buffers

DATA SHEET DS-0006-00

Page 5

LZS221-C Version 6 Data Compression Software

LZS221-C Files

The LZS221-C library is composed of several files. They are summarized below:

LZS.H - This header file contains the function prototypes and constant definitions. This header file should be included in all source modules that access the LZS221-C library. This file may be modified by the implementor. There are some compile-time switches that may be selected based on the characteristics of the processor and of the application. These switches may be implemented by modifying this file, or by using compiler options. These settings are described in detail in the Compile-Time Options section.

HIFNUTIL.H This file contains function prototypes of functions inside HIFNUTIL.C. This file may be modified by the implementor.

HIFNDEFS.H This file contains machine specific definitions used by LZS221C, and the algorithm libraries. This file may be modified by the implementor, for example, to redefine non-machine specific constants such as u32b, and to define the switches needed to change the endianess and alignment.

HIFNUTIL.C - This file includes code which utilizes ANSI-C utilities that are required by LZS221-C, which may not be available in an embedded environment. Implementers may modify this file to redefine functions to call their own routines.

LZSI.H This file includes internal function prototypes and constant definitions. This file must not be modified by the implementor.

LZSC.C - This source file contains the functions required for compression operations. This file must not be modified by the implementor.

LZSD.C - This source file contains the functions required for decompression operations. This file must not be modified by the implementor.

Function Summary

Functions related to data compression processing are:

LZS_C_SizeOfCompressionHistory - Returns amount of memory required for each compression history.

LZS_C_InitializeCompressionHistory - Initializes a compression history.

LZS_C_Compress - Compresses a block of data.

Functions related to data decompression are:

LZS_C_SizeOfDecompressionHistory - Returns amount of memory required for each decompression history.

LZS_C_InitializeDecompressionHistory - Initializes a decompression history.

Page 6

DS-0006-00 DATA SHEET

LZS221-C Version 6 Data Compression Software LZS_C_Decompress - Decompresses a block of data.

Compile-Time Options
Byte Ordering
One of the following two constants in the HIFNDEFS.H file must be defined to the byte ordering used by the processor. The only valid values for this constant are the following:

HIFN_LITTLE_ENDIAN - Least significant bytes first. This is the default.

HIFN_BIG_ENDIAN - Most significant bytes first.

HIFN_ALIGNED

This constant in the HIFNDEFS.H file , if defined, will produce a version of the library that defines type-aligned memory accesses. A type-aligned memory access restricts accesses to memory addresses that are evenly divisible by the size of the data being accessed. A u8b may reside at any address, a u16b only at even addresses, and a u32b only on a quad byte boundary. This is required for some RISC processors. The default is that HIFN_ALIGNED is not defined. Defining this constant may slow performance slightly.

LZS_C_PERFORMANCE

This constant in the LZS.H file specifies an compile time setting for controlling the amount of time that the Compress function will spend compressing the current buffer of data. Smaller values for the LZS_C_PERFORMANCE switch will force faster execution of the Compress function at the cost of compression ratio.

There is a footprint size difference between LZS_C_PERFORMANCE is set to 2 and when LZS_C_PERFORMANCE is set to The memory footprints requirements change when LZS_C_PERFORMANCE is less than or equal to 2 and when LZS_C_PERFORMANCE is greater than or equal to A value of 0 in the LZS_C_PERFORMANCE column of Figure 2 reflects the footprint size for LZS_C_PERFORMANCE settings of 0 to A value of 6 in the LZS_C_PERFORMANCE column of Figure 2 reflects the footprint size for LZS_C_PERFORMANCE settings of 3 to

The LZS_C_PERFORMANCE compile-time switch has seven possible value settings. The valid range for the LZS_C_PERFORMANCE switch is 0 through LZS_C_MAXIMUM_ PERFORMANCE_VALUE. The default value of this compiler option is LZS_C_MAXIMUM_ PERFORMANCE_VALUE.

Page 8

DS-0006-00 DATA SHEET

LZS221-C Version 6 Data Compression Software

Note the value of LZS_C_MAXIMUM_ PERFORMANCE_VALUE for this version of code is

Constants, Types, & Bits

In addition to the compile-time options described previously, there are many constants defined in the LZS221-C source code that are referred to in this document. A complete list of such constants is in the HIFNDEFS.H and LZS.H header files. See the function definitions in this document for further information concerning these constants.

LZS_C_DESTINATION_EXHAUSTED LZS_C_DESTINATION_FLUSH LZS_C_DESTINATION_MINIMUM LZS_C_END_MARKER LZS_C_FLUSHED LZS_C_INVALID LZS_C_SAVE_HISTORY LZS_C_SOURCE_EXHAUSTED LZS_C_SOURCE_FLUSH LZS_C_UPDATE_HISTORY

Note All unused bits in function return values must be ignored. All unused bits in input parameters must be set to zero.
u32b is a type definition which is defined to be a 32-bit unsigned data type for the target compiler.
u8b is a type definition which is defined to be a 8-bit unsigned data type for the target compiler.

All bits that are reserved must be written with zeros and ignored when read.

Performance

Figure 1 lists the approximate speed of compression and decompression. This performance is based on compressing a typical ASCII text file. The LZS _ C_PERFORMANCE is set to zero, and the LZS_C_FOOTPRINT variable is set to LZS_C_FOOTPRINT_10 constant.

Processor Pentium 200 MMX
compress Kbytes/s
5,020
decompress Kbytes/s
6,374

Figure Typical speed

The LZS_C_PERFORMANCE and LZS_C_FOOTPRINT settings control speed vs. compression ratio and history size trade-off within the LZS_C_Compress function. Figure 2 demonstrates how these parameters affect the overall performance of compression.

DATA SHEET DS-0006-00

Page 9

LZS221-C Version 6 Data Compression Software

The LZS_C_PERFORMANCE and LZS_C_FOOTPRINT settings affect neither the decompression speed nor the decompression memory requirements.

These two examples use the standard text file of the U.S. Constitution in 1500 byte packet sizes running on a Pentium 200 MMX CPU. The code was compiled under Microsoft’s Visual C++ v4.20 with full speed optimizations turn on using the “Pentium” processor model.

LZS_C_PERFORMANCE LZS_C_FOOTPRINT

Compress speed

Kbytes/s

Compression ratio

Approximate compress/decompress history size Kbytes

FOOOTPRINT_10 5,020
12/4 32-bit compiler 8/4 16-bit compiler
More datasheets: FC50-04-CA012 | FC50-04-CA006 | FC50-04-CA003 | FC50-08-CA003 | FC50-02-CA012 | FC50-02-CA003 | FC50-01-CA012 | CY3125R62 | STAND T | 520


Notice: we do not provide any warranties that information, datasheets, application notes, circuit diagrams, or software stored on this website are up-to-date or error free. The archived LZS221-C Datasheet file may be downloaded here without warranties.

Datasheet ID: LZS221-C 512903