*added map and unmap

*fix 8 bit types in stream