param buf param num export function bufLeftShift ( buf , num ) { const result = Buffer . alloc ( buf . length , buf ) ; for ( let i = 0 ; i < result . length - num ; i ++ ) { result [ i ] = result [ i + num ] ; } for ( let i = result . length - num ; i < result . length ; i ++ ) { result [ i ] = 0 ; } return result ; }