Safe-abort binary encoder.