Buffer data in encoding, fix z (was int)