added support of unpacking from RandomAccessFile