Read and write using raw bytes instead of string