Skip to content
Success

Changes

Summary

  1. construct: move __bytes_required to utils and finish the implementation (details)
Commit 95d7ab01e71dc674c5f671bb79eab717f91d02c1 by pmaier@sysmocom.de
construct: move __bytes_required to utils and finish the implementation

The method __bytes_required in the GreedyInteger class computes how many
byte a given integer number requires, when it is encoded. This method
currently only works for unsigned integers. Let's move it to utils and
add support for signed integers.

Related: SYS#7094
Change-Id: I9ae4acc30dbd5fb6a6b24b10254ffb205bfde52d
The file was modifiedsrc/osmocom/utils.py
The file was modifiedsrc/osmocom/construct.py
The file was modifiedtests/test_utils.py