Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
rhsm
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/rhsm/pathtree.pyo
mς Wx[Uc @ sL d k Z d k Z d k l Z d k l Z d Z d e f d YZ d S( N( s GhettoBitStream( s HuffmanNodes PATH ENDt PathTreec B sz t Z d Z d Z d Z e d Z e d Z e d Z e d Z e d Z e d Z RS( st This builds and makes available a tree that represents matchable paths. A path must be matched starting from its root and the root of the tree, matching one segment at a time. There are three trees involved in the process, and that can get confusing. 1) Word Tree: This is a Huffman tree made from the word list provided at the beginning of the data stream. 2) Huffman Path Tree: This is a Huffman tree made of nodes whose values will become nodes in the Path Tree. This tree exists so there can be a Huffman code associated with each node in the Path Tree. However, the Path Tree itself will arrange this data much differently. 3) Path Tree: This is the tree used to match paths. Each node is a dict where keys are path segments (the middle part of /.../) and each value is a list of other nodes. c C s | i | \ } } t i | t d | D } t | } | i | } t i | t d | D } | i | | | | | _ d S( s Uncompresses data into a tree that can be traversed for matching paths :param data: binary data as read from a file or pulled directly out of a certificate extension. Data should be compressed with huffman coding as described for v3 entitlement certificates :type data: binary string c c s$ x | ] } | i | i f Vq Wd S( N( t [outmost-iterable]t nodet codet value( R R ( ( t1 /usr/lib/python2.4/site-packages/rhsm/pathtree.pyt <generator expression>8 s c c s! x | ] } | i | f Vq Wd S( N( R R R ( R R ( ( R R <