Fixed erroneous initial size estimates in encode*