Product Documentation
Virtuoso Studio Design Environment SKILL Reference
Product Version IC23.1, November 2023

dbSetLibDataCompressionLevel

dbSetLibDataCompressionLevel(
dd_libId
[ n_compressionLevel ]
)
=> t/ nil

Description

Sets the data compression level for designs that are saved to the specified library ID.

Arguments

dd_libId

The ID of the library whose data compression level must be set.

n_compressionLevel

The data compression level that must be set on the specified library ID. The compression level must be an integer between 1 and 9 (inclusive).

If this optional argument is not specified, the OpenAccess default compression level is used.

Values Returned

t

Returns t if the data compression level is successfully set on the specified library ID.

nil

Returns nil if the data compression level could not be set.

Examples

dbSetLibDataCompressionLevel( dd_libId 1 ) 
=> t

Additional Information

A compression level indicates the amount of effort the compression algorithm uses when compressing data. A higher level does not necessarily correspond to better compression efficiency. The supported levels range from 1 to 9. The default level 1 provides an optimized balance between efficiency and performance.

Changing the compression level of the library only affects the designs that are saved to the library after the compression level is set. It does not recompress the existing designs in the library.

This process uses the zlib compression algorithm. The compression level refers to the number of passes the algorithm makes as it tries to compress the data. More passes results in more compression, but is affected by the diminishing returns. Additionally, for some types of data more passes can increase the size of data instead of decreasing it. However, more passes do not change the format of the compressed data, therefore, there are no compatibility issues between the compression levels.

Compression is implemented at the OpenAccess database level and is fully supported by any application or tool that reads and writes the OpenAccess data. This is a transparent process and the applications are not aware that the data is compressed.

Data is decompressed into memory when it is read from disk and is re-compressed only when writing back to the disk. Decompression does not require a lot of time and is much faster than having to push as much data across the network through NFS to read the data. Compressed data performs faster than the non-compressed data when the network is involved. However, the performance benefits are highly dependent on the users network and how the data is organized. The performance of writing compressed data is significantly higher (and increases as the number of passes specified by the compression level increases).

Since data is read much more frequently than it is written, exchanging longer write times for shorter read times is usually beneficial unless a non-default compression level is used. Different compression levels can be used within the same library and the same design hierarchy. This means that the same cell can even have different views with different compression levels and the same cellview may instantiate different masters with different compression levels. The compression level of the library is only the compression level that is used when new data is written to that library. SKILL functions are not aware of this process and cannot even detect that they are operating on compressed data. This is why SKILL functions that operate across hierarchies in a mixed-compression- level environment are not affected in anyway.


Return to top
 ⠀
X