call the method stream.unget with list containing elements of chunk list from the header_end incremented by integer 4 as a start index to the end as argument.
stream . unget ( chunk [ header_end + 4 : ] )