diff --git a/NeoBoot/ubi_reader/ubi_reader_arm/ubifs/misc.py b/NeoBoot/ubi_reader/ubi_reader_arm/ubifs/misc.py deleted file mode 100644 index 658068b..0000000 --- a/NeoBoot/ubi_reader/ubi_reader_arm/ubifs/misc.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/python -#import lzo -import struct -import zlib -from ubifs.defines import * -ino_types = ['file', - 'dir', - 'lnk', - 'blk', - 'chr', - 'fifo', - 'sock'] -node_types = ['ino', - 'data', - 'dent', - 'xent', - 'trun', - 'pad', - 'sb', - 'mst', - 'ref', - 'idx', - 'cs', - 'orph'] -key_types = ['ino', - 'data', - 'dent', - 'xent'] - -def parse_key(key): - hkey, lkey = struct.unpack('> UBIFS_S_KEY_BLOCK_BITS - khash = lkey - return {'type': key_type, - 'ino_num': ino_num, - 'khash': khash} - - -def decompress(ctype, unc_len, data): - #if ctype == UBIFS_COMPR_LZO: - #return lzo.decompress(''.join(('\xf0', struct.pack('>I', unc_len), data))) - if ctype == UBIFS_COMPR_ZLIB: - return zlib.decompress(data, -11) - else: - return data \ No newline at end of file