move DecodeHeader to stream
add FrameMap