Package netaddr :: Module util |
[hide private]
[frames] | no frames]

# Module util

source code

utility functions

Functions | [hide private]
num_bits(n) Minimum number of bits needed to represent a given unsigned integer. | source code
bytes_to_bits() Generates a 256 element list of 8-bit binary digit strings. | source code

Variables | [hide private]
| BYTES_TO_BITS = ``[``'``00000000``'``,` `'``00000001``'``,` `'``00000010``'``,` `'``00000011``...``

Function Details | [hide private]

### bytes_to_bits() | source code
Generates a 256 element list of 8-bit binary digit strings. List index is equivalent to the bit string value.

Variables Details | [hide private]

  ### BYTES_TO_BITS Value:
      ['00000000',
       '00000001',
       '00000010',
       '00000011',
       '00000100',
       '00000101',
       '00000110',
       '00000111',
      ...