Skip to content

Commit

Permalink
Update Chunks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Captian-obvious authored Nov 23, 2023
1 parent 601c9d2 commit be483a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def createTable(length,val):
return arr
##end
def extract(byte,field,width):
shifted_number=number >> (length-1)
width=conditionalSet(width!=None,width,1)
shifted_number=number >> (width-1)
mask = (1 << field) - 1
extracted_bits=shifted_number & mask
extracted_number=bin(extracted_bits)[2:]
Expand Down

0 comments on commit be483a4

Please sign in to comment.