Package goby :: Module MessageChunks :: Class MessageChunksReader
[hide private]
[frames] | no frames]

Class MessageChunksReader

source code

object --+
         |
        MessageChunksReader
Known Subclasses:

Class to parse a file that contains goby "chunked" data. The MessageChunksReader is actually an iterator over indiviual entries stored in the compressed file.

Instance Methods [hide private]
 
__init__(self, filename, verbose=False)
Initialize the MessageChunksReader using the name of the of the compact file (reads, alignment entries, etc.)
source code
 
__del__(self)
Close the underlying file when the object is destroyed
source code
 
next(self)
Return next chunk of bytes from the file.
source code
 
__iter__(self)
The message chunks reader is actually an iterator over chunks in the compact file.
source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  verbose = False
print verbose messages
  filename = None
the name of the chunked file
  fileobject = None
handle to the actual chunked file
  fileindex = None
the current index into the chunked file
  DELIMITER_LENGTH = 8
length of the delimiter tag (in bytes)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, verbose=False)
(Constructor)

source code 

Initialize the MessageChunksReader using the name of the of the compact file (reads, alignment entries, etc.)

Overrides: object.__init__

__iter__(self)

source code 

The message chunks reader is actually an iterator over chunks in the compact file. Each iteration will return a chunk of bytes raw bytes which can then be processed

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)