本文整理汇总了Python中s3py.io.StreamReader.u64方法的典型用法代码示例。如果您正苦于以下问题:Python StreamReader.u64方法的具体用法?Python StreamReader.u64怎么用?Python StreamReader.u64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类s3py.io.StreamReader
的用法示例。
在下文中一共展示了StreamReader.u64方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: read_property
# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import u64 [as 别名]
def read_property(self, stream, hash, tgi):
s = StreamReader(stream)
id = s.u32()
value = None
if not id:
return False
if not s.u8():
t = s.u8()
if t == 0x00: value = bool(s.u8())
elif t == 0x01: value = s.i8()
elif t == 0x02: value = s.i16()
elif t == 0x03: value = s.i32()
elif t == 0x04: value = s.i64()
elif t == 0x05: value = s.u8()
elif t == 0x06: value = s.u16()
elif t == 0x07: value = s.u32()
elif t == 0x08: value = s.u64()
elif t == 0x09: value = s.f32()
elif t == 0x0A: value = [s.f32() for i in range(4)]
elif t == 0x0B: value = [s.f32() for i in range(4)]
elif t == 0x0C: value = tgi.get_resource(s.u8())
elif t == 0x0D: value = s.p16()
else: raise Exception("Unknown TXTC parameter type %s" % t)
hash[id] = value
return True
示例2: read
# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import u64 [as 别名]
def read(self, stream, resource=None):
s = StreamReader(stream)
self.version = s.u32()
cNames = s.u32()
for i in range(cNames):
iid = s.u64()
name = s.p32()
self.names[iid] = name
示例3: read
# 需要导入模块: from s3py.io import StreamReader [as 别名]
# 或者: from s3py.io.StreamReader import u64 [as 别名]
def read(self, stream, resources=None):
s = StreamReader(stream)
self.version = s.u32()
tgi = TGIList(package=resources)
tgi.begin_read(stream)
self.locale_key = s.u64()
self.indexers = [tgi.get_resource(s.i32()) for i in range(s.i32())]
self.is_bi_directional = bool(s.u32())
self.cas_panel_group = s.u32()
self.sort_index = s.i32()
assert s.u32() == 0
tgi.end_read(stream)