Minimize unnecessary function calls

Inside BinaryEncoder

* calling self._writer.write instead of going through self.write