for BufferDecoder pad teh last block with zeros