2026-02-01 13:01:28 +00:00

18 lines
285 B
JavaScript

'use strict'
const { Transform } = require('stream')
class ByteaEncoder extends Transform {
constructor () {
super()
this.push('\\\\x')
}
_transform (chunk, encoding, callback) {
this.push(chunk.toString('hex'))
callback()
}
}
module.exports = ByteaEncoder