example param { Buffer } buffer return { Buffer } export default ( buffer ) : Buffer => { const result = Buffer . alloc ( buffer . length ) ; for ( let i = 0 ; i < buffer . length ; i ++ ) result [ i ] = ~ buffer [ i ] ; return result ; } ;