MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / inflate_trees_bits

Function inflate_trees_bits

src/Setup/unzip.cpp:1834–1858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1832
1833
1834int inflate_trees_bits(
1835uInt *c, // 19 code lengths
1836uInt *bb, // bits tree desired/actual depth
1837inflate_huft * *tb, // bits tree result
1838inflate_huft *hp, // space for trees
1839z_streamp z) // for messages
1840{
1841 int r;
1842 uInt hn = 0; // hufts used in space
1843 uInt *v; // work area for huft_build
1844
1845 if ((v = (uInt*)ZALLOC(z, 19, sizeof(uInt))) == Z_NULL)
1846 return Z_MEM_ERROR;
1847 r = huft_build(c, 19, 19, (uInt*)Z_NULL, (uInt*)Z_NULL,
1848 tb, bb, hp, &hn, v);
1849 if (r == Z_DATA_ERROR)
1850 z->msg = (char*)"oversubscribed dynamic bit lengths tree";
1851 else if (r == Z_BUF_ERROR || *bb == 0)
1852 {
1853 z->msg = (char*)"incomplete dynamic bit lengths tree";
1854 r = Z_DATA_ERROR;
1855 }
1856 ZFREE(z, v);
1857 return r;
1858}
1859
1860
1861int inflate_trees_dynamic(

Callers 1

unzip.cppFile · 0.85

Calls 1

huft_buildFunction · 0.85

Tested by

no test coverage detected