Implement encode decode binary-string