preProcessForLength() method added to allow processing of encoded data