Fixed encoding and decoding