- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am going to be compressing varying length blobs with LZO and I would like to make it as fast as possible yet single threaded. I am thinking of caching my IppLZOState_8u structure and keep reusing it until ippsEncodeLZOGetSize returns a bigger structure size. However, I am wondering whether I have to call ippsEncodeLZOInit before every call to ippsEncodeLZO_8u or just when I allocate the structure? Optimally, I would like to call ippsEncodeLZOInit only after allocating the structure.
Thanks!
I am going to be compressing varying length blobs with LZO and I would like to make it as fast as possible yet single threaded. I am thinking of caching my IppLZOState_8u structure and keep reusing it until ippsEncodeLZOGetSize returns a bigger structure size. However, I am wondering whether I have to call ippsEncodeLZOInit before every call to ippsEncodeLZO_8u or just when I allocate the structure? Optimally, I would like to call ippsEncodeLZOInit only after allocating the structure.
Thanks!
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The structure needs to be allocated/initialized only once. In single-threaded mode the LZOGetSize function always returns the same size of about 64K for the structure, so despite the input data sizemay bedifferent, the structure is the same.
When it comes to multi-threaded mode, in GetSize call it'snecessary to specify the maximum length of input data buffer. And the structure size, returned by this call, greatly depends on that maximum length.
Regards,
Sergey
The structure needs to be allocated/initialized only once. In single-threaded mode the LZOGetSize function always returns the same size of about 64K for the structure, so despite the input data sizemay bedifferent, the structure is the same.
When it comes to multi-threaded mode, in GetSize call it'snecessary to specify the maximum length of input data buffer. And the structure size, returned by this call, greatly depends on that maximum length.
Regards,
Sergey
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page