bx.misc.filecache module

class bx.misc.filecache.FileCache(file, size, cache_size=10, block_size=2097152)

Bases: object

Wrapper for a file that cache blocks of data in memory.

NOTE: this is currently an incomplete file-like object, it only supports seek, tell, and readline (plus iteration). Reading bytes is currently not implemented.

close()
fix_dirty()
get_block_and_offset(index)
load_block(index)
readline()
seek(offset, whence=0)

Move the file pointer to a particular offset.