On 8/3/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > Please look at the code in prepare(), for example. In there, lzf_compress() > is > used to take page_size bytes of data from buf, compress them and place the > result under the address block->data, with the assumption that the size of the > result will be _less_ than page_size (otherwise, plain memcpy() is used). I > think you should be able to do something like this with lzo1x_1_compress().
You cannot do this as the lzo1x_1_compress() does not test for buffer overflow for target. So you must give it a buffer large enough... We can make sure that the output buffer is always in the right size, then the memcpy is not needed. > BTW, how exactly does lzo1x_1_compress() work? What do you mean? http://www.oberhumer.com/opensource/lzo/lzodoc.php The package has some documentation and a lot of examples... Alon. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel