Simple realization of encoding and decoding data in b-encode format