Fix bug in compression library

- Due to compatibility, required to add a 0.toByte at the beginning of toWrite.
- TODO: remove it once writing names is permanent.