Changeset 300 for proto


Ignore:
Timestamp:
Sep 11, 2009, 2:18:25 PM (10 years ago)
Author:
ksherdy
Message:

Added extract_bit routine to extract the bit value at a position.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/bitutil.py

    r296 r300  
    3636                strm >>= 1
    3737        return zeroes
     38
     39def extract_bit(strm, pos):
     40        bit = (strm >> pos) & 1
     41        return bit
    3842       
    3943#
     
    138142#
    139143#  ScanThru is the core operation for parallel scanning.
    140 #  Give a bitstream Cursors marking current cursor positions,
     144#  Given a bitstream Cursors marking current cursor positions,
    141145#  advance each cursor through occurrences of a character
    142146#  class identified by ScanStream.
Note: See TracChangeset for help on using the changeset viewer.