< index < 11. Compression toolkit < 11.1 Creating a compression buffer | ===================================== 11.2 Putting data in the buffer ===================================== | > 11.3 Saving the compressed data to a file

You can add data in the buffer by using one of those functions.

    C++ : void TCODZip::putChar(char val)
    C   : void TCOD_zip_put_char(TCOD_zip_t zip, char val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | A 8 bits value to store in the buffer

    C++ : void TCODZip::putInt(int val)
    C   : void TCOD_zip_put_int(TCOD_zip_t zip, int val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | An integer value to store in the buffer

    C++ : void TCODZip::putFloat(float val)
    C   : void TCOD_zip_put_float(TCOD_zip_t zip, float val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | A float value to store in the buffer

    C++ : void TCODZip::putString(const char *val)
    C   : void TCOD_zip_put_string(TCOD_zip_t zip, const char *val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | A string to store in the buffer

    C++ : void TCODZip::putColor(const TCODColor *val)
    C   : void TCOD_zip_put_color(TCOD_zip_t zip, const TCOD_color_t val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | A color to store in the buffer

    C++ : void TCODZip::putImage(const TCODImage *val)
    C   : void TCOD_zip_put_image(TCOD_zip_t zip, const TCOD_image_t val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | An image to store in the buffer

    C++ : void TCODZip::putConsole(const TCODConsole *val)
    C   : void TCOD_zip_put_console(TCOD_zip_t zip, const TCOD_console_t val)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
val | A console to store in the buffer

    C++ : void TCODZip::putData(int nbBytes, const void *data)
    C   : void TCOD_zip_put_data(TCOD_zip_t zip, int nbBytes, const void *data)

Parameter | Description
--- | ---
zip | In the C version, the buffer handler, returned by the constructor.
nbBytes | Number of bytes to store in the buffer
val | Address of the data to store in the buffer