BCDataStream can now also take file pointer as argument

This commit is contained in:
Lex Berezhny 2020-02-14 11:34:26 -05:00
parent bad4320ddf
commit 2ee13ce39f

View file

@ -4,8 +4,8 @@ from io import BytesIO
class BCDataStream:
def __init__(self, data=None):
self.data = BytesIO(data)
def __init__(self, data=None, fp=None):
self.data = fp or BytesIO(data)
def reset(self):
self.data.seek(0)