coalesced streaming compression code
+ speed optimization