MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi_zlib_decode_noheader_malloc

Function stbi_zlib_decode_noheader_malloc

include/stb/stb_image.h:4568–4582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4566}
4567
4568STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen)
4569{
4570 stbi__zbuf a;
4571 char *p = (char *) stbi__malloc(16384);
4572 if (p == NULL) return NULL;
4573 a.zbuffer = (stbi_uc *) buffer;
4574 a.zbuffer_end = (stbi_uc *) buffer+len;
4575 if (stbi__do_zlib(&a, p, 16384, 1, 0)) {
4576 if (outlen) *outlen = (int) (a.zout - a.zout_start);
4577 return a.zout_start;
4578 } else {
4579 STBI_FREE(a.zout_start);
4580 return NULL;
4581 }
4582}
4583
4584STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen)
4585{

Callers

nothing calls this directly

Calls 2

stbi__mallocFunction · 0.85
stbi__do_zlibFunction · 0.85

Tested by

no test coverage detected