text stringlengths 0 234 |
|---|
S := UnZ_Glob.uncompsize; |
while S > 0 and then not UnZ_Glob.Zip_EOF loop |
if UnZ_IO.Bit_buffer.Read_and_dump (1) /= 0 then -- 1 : Litteral |
S := S - 1; |
Ct := Tb.all.table; |
Ci := UnZ_IO.Bit_buffer.Read_inverted (Bb); |
loop |
E := Ct.all (Ci).extra_bits; |
exit when E <= 16; |
if E = invalid then |
raise Zip.Zip_file_Error; |
end if; |
UnZ_IO.Bit_buffer.Dump (Ct.all (Ci).bits); |
E := E - 16; |
Ct := Ct.all (Ci).next_table; |
Ci := UnZ_IO.Bit_buffer.Read_inverted (E); |
end loop; |
UnZ_IO.Bit_buffer.Dump (Ct.all (Ci).bits); |
UnZ_Glob.slide (W) := Zip.Byte (Ct.all (Ci).n); |
W := W + 1; |
UnZ_IO.Flush_if_full (W, unflushed); |
else -- 0 : Copy |
D := UnZ_IO.Bit_buffer.Read_and_dump (Needed); |
Ct := Td.all.table; |
Ci := UnZ_IO.Bit_buffer.Read_inverted (Bd); |
loop |
E := Ct.all (Ci).extra_bits; |
exit when E <= 16; |
if E = invalid then |
raise Zip.Zip_file_Error; |
end if; |
UnZ_IO.Bit_buffer.Dump (Ct.all (Ci).bits); |
E := E - 16; |
Ct := Ct.all (Ci).next_table; |
Ci := UnZ_IO.Bit_buffer.Read_inverted (E); |
end loop; |
UnZ_IO.Bit_buffer.Dump (Ct.all (Ci).bits); |
D := D + Ct.all (Ci).n; |
Ct := Tl.all.table; |
Ci := UnZ_IO.Bit_buffer.Read_inverted (Bl); |
loop |
E := Ct.all (Ci).extra_bits; |
exit when E <= 16; |
if E = invalid then |
raise Zip.Zip_file_Error; |
end if; |
UnZ_IO.Bit_buffer.Dump (Ct.all (Ci).bits); |
E := E - 16; |
Ct := Ct.all (Ci).next_table; |
Ci := UnZ_IO.Bit_buffer.Read_inverted (E); |
end loop; |
UnZ_IO.Bit_buffer.Dump (Ct.all (Ci).bits); |
N := Ct.all (Ci).n; |
if E /= 0 then |
N := N + UnZ_IO.Bit_buffer.Read_and_dump (8); |
end if; |
S := S - Unsigned_32 (N); |
UnZ_IO.Copy_or_zero ( |
distance => D, |
copy_length => N, |
index => W, |
unflushed => unflushed |
); |
end if; |
end loop; |
UnZ_IO.Flush (W); |
if UnZ_Glob.Zip_EOF then |
raise UnZip.Read_Error; |
end if; |
if full_trace then |
pragma Warnings (Off, "this code can never be executed and has been deleted"); |
Ada.Text_IO.Put_Line ("End Explode_lit"); |
pragma Warnings (On, "this code can never be executed and has been deleted"); |
end if; |
end Explode_Lit; |
procedure Explode_Nolit ( -- method with 2 trees |
Needed : Integer; |
Tl, Td : p_Table_list; |
Bl, Bd : Integer |
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.