Package entropy :: Module xpak

Module xpak

source code

Classes
  tbz2
Functions
 
addtolist(mylist, curdir)
(list, dir) --- Takes an array(list) and appends all files from dir down the directory tree.
source code
 
encodeint(myint)
Takes a 4 byte integer and converts it into a string of 4 characters.
source code
 
decodeint(mystring)
Takes a 4 byte string and converts it into a 4 byte integer.
source code
 
xpak(rootdir, outfile=None)
(rootdir,outfile) -- creates an xpak segment of the directory 'rootdir' and under the name 'outfile' if it is specified.
source code
 
xpak_mem(mydata)
Create an xpack segement from a map object.
source code
 
xsplit(infile)
(infile) -- Splits the infile into two files.
source code
 
xsplit_mem(mydat) source code
 
getindex(infile)
(infile) -- grabs the index segment from the infile and returns it.
source code
 
getboth(infile)
(infile) -- grabs the index and data segments from the infile.
source code
 
listindex(myindex)
Print to the terminal the filenames listed in the indexglob passed in.
source code
 
getindex_mem(myindex)
Returns the filenames listed in the indexglob passed in.
source code
 
searchindex(myindex, myitem)
(index,item) -- Finds the offset and length of the file 'item' in the datasegment via the index 'index' provided.
source code
 
getitem(myid, myitem) source code
 
xpand(myid, mydest) source code
Function Details

addtolist(mylist, curdir)

source code 

(list, dir) --- Takes an array(list) and appends all files from dir down the directory tree. Returns nothing. list is modified.

encodeint(myint)

source code 

Takes a 4 byte integer and converts it into a string of 4 characters. Returns the characters in a string.

decodeint(mystring)

source code 

Takes a 4 byte string and converts it into a 4 byte integer. Returns an integer.

xpak(rootdir, outfile=None)

source code 

(rootdir,outfile) -- creates an xpak segment of the directory 'rootdir' and under the name 'outfile' if it is specified. Otherwise it returns the xpak segment.

xsplit(infile)

source code 

(infile) -- Splits the infile into two files. 'infile.index' contains the index segment. 'infile.dat' contails the data segment.

getboth(infile)

source code 

(infile) -- grabs the index and data segments from the infile. Returns an array [indexSegment,dataSegment]