engine/script/src/script_zlib.cpp
/*# Zlib compression API documentation
     *
     * Functions for compression and decompression of string buffers.
     *
     * @document
     * @name Zlib
     * @namespace zlib
     */
Zlib compression API documentation
Functions for compression and decompression of string buffers.

@document
@name Zlib
@namespace zlib
Zlib compression API documentation Functions for compression and decompression of string buffers . @document @name Zlib @namespace zlib
static bool Writer(void* context, const void* buffer, uint32_t buffer_size)
    {
        dmArray<uint8_t>* out = (dmArray<uint8_t>*) context;
        if (out->Remaining() < buffer_size) {
            int r = out->Remaining();
            int offset = dmMath::Max((int) buffer_size - r, 32 * 1024);
            out->OffsetCapacity(offset);
        }
        out->PushArray((const uint8_t*) buffer, buffer_size);
        return true;
    }
static bool Writer ( void * context , const void * buffer , uint32_t buffer_size ) { dmArray < uint8_t > * out = ( dmArray < uint8_t > * ) context ; if ( out -> Remaining ( ) < buffer_size ) { int r = out -> Remaining ( ) ; int offset = dmMath :: Max ( ( int ) buffer_size - r , 32 * 1024 ) ; out -> OffsetCapacity ( offset ) ; } out -> PushArray ( ( const uint8_t * ) buffer , buffer_size ) ; return true ; }
Zlib compression API documentation
 Functions for compression and decompression of string buffers.
Zlib compression API documentation Functions for compression and decompression of string buffers .