File tree 3 files changed +5
-8
lines changed 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { Bits } from '../types'
2
+ import { p2 } from '../utilities'
2
3
import not from '../bits/not'
3
4
import read from './read'
4
5
5
- // 32-bit powers of two wouldn't be possible with <<
6
- const p2 : Array < number > = [ ]
7
- for ( let i : number = 0 ; i < 32 ; i ++ ) p2 [ i ] = Math . pow ( 2 , i )
8
-
9
6
/**
10
7
* Converts a section of a buffer to a signed integer.
11
8
*
Original file line number Diff line number Diff line change 1
1
import { Bits } from '../types'
2
+ import { p2 } from '../utilities'
2
3
import read from './read'
3
4
4
- // 32-bit powers of two wouldn't be possible with <<
5
- const p2 : Array < number > = [ ]
6
- for ( let i : number = 0 ; i < 32 ; i ++ ) p2 [ i ] = Math . pow ( 2 , i )
7
-
8
5
/**
9
6
* Converts a section of a buffer to an unsigned integer.
10
7
*
Original file line number Diff line number Diff line change
1
+ // 32-bit powers of two wouldn't be possible with <<
2
+ export const p2 : Array < number > = [ ]
3
+ for ( let i : number = 0 ; i < 32 ; i ++ ) p2 [ i ] = Math . pow ( 2 , i )
You can’t perform that action at this time.
0 commit comments