internal static int inflate_trees_dynamic(int nl, int nd, int[] c, int[] bl, int[] bd, int[] tl, int[] td, int[] hp, ZStream z) { int[] hn = new int[1]; int[] v = new int[288]; int num = InfTree.huft_build(c, 0, nl, 257, InfTree.cplens, InfTree.cplext, tl, bl, hp, hn, v); if (num != 0 || bl[0] == 0) { if (num == -3) { z.msg = "oversubscribed literal/length tree"; } else { if (num != -4) { z.msg = "incomplete literal/length tree"; num = -3; } } return(num); } num = InfTree.huft_build(c, nl, nd, 0, InfTree.cpdist, InfTree.cpdext, td, bd, hp, hn, v); if (num != 0 || (bd[0] == 0 && nl > 257)) { if (num == -3) { z.msg = "oversubscribed distance tree"; } else { if (num == -5) { z.msg = "incomplete distance tree"; num = -3; } else { if (num != -4) { z.msg = "empty distance tree with lengths"; num = -3; } } } return(num); } return(0); }
internal static int inflate_trees_bits(int[] c, int[] bb, int[] tb, int[] hp, ZStream z) { int[] hn = new int[1]; int[] v = new int[19]; int num = InfTree.huft_build(c, 0, 19, 19, null, null, tb, bb, hp, hn, v); if (num == -3) { z.msg = "oversubscribed dynamic bit lengths tree"; } else if (num == -5 || bb[0] == 0) { z.msg = "incomplete dynamic bit lengths tree"; num = -3; } return(num); }
internal static int inflate_trees_bits(int[] c, int[] bb, int[] tb, int[] hp, ZStream z) { int[] numArray1 = new int[1]; int[] numArray2 = new int[0x13]; int num1 = InfTree.huft_build(c, 0, 0x13, 0x13, null, null, tb, bb, hp, numArray1, numArray2); if (num1 == -3) { z.msg = "oversubscribed dynamic bit lengths tree"; return(num1); } if ((num1 != -5) && (bb[0] != 0)) { return(num1); } z.msg = "incomplete dynamic bit lengths tree"; return(-3); }
internal static int inflate_trees_dynamic(int nl, int nd, int[] c, int[] bl, int[] bd, int[] tl, int[] td, int[] hp, ZStream z) { int[] numArray1 = new int[1]; int[] numArray2 = new int[0x120]; int num1 = InfTree.huft_build(c, 0, nl, 0x101, InfTree.cplens, InfTree.cplext, tl, bl, hp, numArray1, numArray2); if ((num1 != 0) || (bl[0] == 0)) { if (num1 == -3) { z.msg = "oversubscribed literal/length tree"; return(num1); } if (num1 != -4) { z.msg = "incomplete literal/length tree"; num1 = -3; } return(num1); } num1 = InfTree.huft_build(c, nl, nd, 0, InfTree.cpdist, InfTree.cpdext, td, bd, hp, numArray1, numArray2); if ((num1 == 0) && ((bd[0] != 0) || (nl <= 0x101))) { return(0); } if (num1 == -3) { z.msg = "oversubscribed distance tree"; return(num1); } if (num1 == -5) { z.msg = "incomplete distance tree"; return(-3); } if (num1 != -4) { z.msg = "empty distance tree with lengths"; num1 = -3; } return(num1); }