| synopsis || arguments || prev || next |

kdu_block::set_max_bytes

Java: Kdu_block::Set_max_bytes

void set_max_bytes( int new_bytes, bool copy_existing=true)

Java: void Set_max_bytes( int new_bytes, boolean copy_existing)

[Declared in "../coresys/common/kdu_compressed.h"]

Go to class description.


Synopsis

This function should be called to augment the number of code bytes which can be stored in the structure. For efficiency, call the function only when you know that there is a potential problem with the current allocation, by testing the public data member, max_bytes.

An encoder may check the available storage between coding passes to minimize overhead, exploiting the fact that there is a well-defined upper bound to the number of bytes which the MQ coder is able to generate in any coding pass.


Arguments

new_bytes [int]

Total number of code bytes for which storage is required; function does nothing if sufficient storage already exists.

copy_existing [bool]

If true, any existing code bytes will be copied into the newly allocated (enlarged) byte buffer.


| top || synopsis || arguments || prev || next |