| 45 | */ |
| 46 | |
| 47 | static bool Writer(void* context, const void* buffer, uint32_t buffer_size) |
| 48 | { |
| 49 | dmArray<uint8_t>* out = (dmArray<uint8_t>*) context; |
| 50 | if (out->Remaining() < buffer_size) { |
| 51 | int r = out->Remaining(); |
| 52 | int offset = dmMath::Max((int) buffer_size - r, 32 * 1024); |
| 53 | out->OffsetCapacity(offset); |
| 54 | } |
| 55 | out->PushArray((const uint8_t*) buffer, buffer_size); |
| 56 | return true; |
| 57 | } |
| 58 | |
| 59 | /*# Inflate (decompress) a buffer |
| 60 | * A lua error is raised is on error |
nothing calls this directly
no test coverage detected