Added more attribute encoding functions to Attribute encoder.