Package mobi :: Package mtld :: Package da :: Package carrier :: Module bucket_handler :: Class BucketHandler
[frames] | no frames]

Class BucketHandler

object --+
         |
        BucketHandler

A bucket is a section of the data file. It has an ID, length and a byte array of data. Each bucket type has a specific format. This class handles the conversion of bucket data (binary bytes) to actual values.

The following buckets are handled:

The bucket handler expects the buckets to be in the above order.


Copyright: Copyright (c) Afilias Technologies Limited 2021. All Rights Reserved.

Author: Afilias Technologies Limited

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
getTreeLefts(self)
Returns the IPv4 Radix Trie "left" pointers.
 
getTreeRights(self)
Returns the IPv4 Radix Trie "right" pointers.
 
getTreeProperties(self)
Returns the properties used in the IPv4 Radix Trie nodes.
 
getPropertyNames(self)
Returns the property names list.
 
getPropertyNamesAsStrings(self)
Returns the property names array
 
processBucket(self, bucketId, fileCrc32, bucketData)
Process a bucket identified by "bucketId".

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

Class Variables
  CRC32_DOES_NOT_MATCH = u'CRC-32 does not match for bucket "%s".'
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

processBucket(self, bucketId, fileCrc32, bucketData)

 

Process a bucket identified by "bucketId". The bucket CRC-32 hash is verified before parsing the bucket data.

Parameters:
  • bucketId
  • fileCrc32
  • bucketData
Raises: