license export const padInput = ( input ) : number [ ] => { let nearestBucket = 4 ; while ( nearestBucket < input . length ) { nearestBucket *= 2 ; } return input . concat ( Array . from ( { length : nearestBucket - input . length } , ( ) => 0 ) ) ; } ;