added some additional functions for dealing with chunks

made as part of mitmproxy streaming support