!WaS?      Safe =b-treeAn internal data structure placed at the very end of the file which describes the header and provides a magic number for sanity checking.b-treeWrite the produced .s to the file followed by the returned headerb-treeWrite the produced .s to the file followed by the returned headerb-treeRead and verify the header from the file, then pass it along with the file's handle to an action. The file handle sits at the beginning of the written content when passed to the action.SafeX b-tree7A file containing a finite list of binary encoded itemsb-treeGet the path to the  BinaryList fileb-tree&Encode the items of the given producerb-treeOpen a  file.#TODO: Sanity checking at open time.b-treeStream the items out of a  BinaryListNone "#147> b-treeB-tree file headerb-tree  represents an empty tree!b-tree! k f e is a B* tree of key type k with elements of type e2. Subtree references are contained within a type f.The " constructor contains a left child, and a list of key/child pairs where each child's keys are greater than or equal to the given key. b-tree!A tree leaf (e.g. key/value pair)#b-tree# a% is a reference to an object of type ar on disk. The offset does not include the header; e.g. the first object after the header is located at offset 0. b-tree5The maximum number of children of a B-tree inner node b-tree!The number of entries in a B-tree$b-treeAn offset within the stream%b-treeThis only compares on the keys&b-treeThis only compares on the keys b-treeA read-only B-tree for lookups'b-tree2It is critical that this encoding is of fixed size()*+,!-" #. $/ 0123456789:Noneb-treeRead a B-tree from a  ByteString produced by b-treeOpen a B-tree file.b-treeLookup a key in a B-tree.b-treeHow many keys are in a  . NoneX5 ;b-tree'nodes to be included in the active node<b-treethe length of dNodes=b-tree6the desired number of elements to fill the active node>b-treeBA Producer which accepts offsets for the yielded objects in return?b-treeRCompute the optimal node sizes for each stratum of a tree of given size and order@b-treeGiven a producer of a known number of leaves, produces an optimal B-tree. Technically the size is only an upper bound: the producer may terminate before providing the given number of leaves although the resulting tree will break the minimal fill invariant.Ab-treebProduce a bytestring representing the nodes and leaves of the B-tree and return a suitable headerb-tree#Build a B-tree into the given file.-As the name suggests, this requires that the Producer& emits leaves in ascending key order.b-treeBuild a B-tree into  ByteString-As the name suggests, this requires that the Producer& emits leaves in ascending key order.This is primarily used for testing. In particular, note that this is a bad idea for large trees as the entire contents of the tree will need to be kept in memory until all leaves have been added so that the header can be prepended.Bb-treeLike Pipes.Prelude.foldA but provides returns producer result in addition to accumulatorb-tree Order of treeb-treeMaximum tree sizeb-tree Output fileb-treeC of elementsb-tree Order of treeb-treeMaximum tree sizeb-treeC of elementsD@None>XCEb-treelMaximum number of leaf lists to attempt to merge at once. This is bounded by the maximum file handle count.b-tree#Build a B-tree into the given file.This does not assume that the leaves are produced in order. Instead, the sorting is handled internally through a simple merge sort. Chunks of leaves are collected, sorted in memory, and then written to intermediate trees. At the end these trees are then merged.Fb-treeJSplit the list into chunks of bounded size and run each through a functionGb-treeTake the first n elements and collect them in a Set . Return a C? which will emit the remaining elements (or the return value).b-treePath to scratch directoryb-treeMaximum chunk sizeb-tree Order of treeb-tree Output fileb-treeC of elementsHb-treePath to scratch directoryb-treeMaximum chunk sizeb-treeC of elementsH NoneFb-treeAIterate over the leaves of the given tree in ascending key order.Ib-treeVIterate over the nodes and leaves of the given tree. These aren't necessarily sorted.IJ NoneRxb-treeBMerge trees' leaves taking ordered leaves from a set of producers.Each producer must be annotated with the number of leaves it is expected to produce. The size of the resulting tree will be at most the sum of these sizes.b-treeMerge several  LookupTreesnThis is a convenience function for merging several trees already on disk. For a more flexible interface, see .b-tree Get a sized C suitable for  from a  b-treemerge operation on elementsb-treeorder of merged treeb-treename of output fileb-treeproducers of leaves to mergeb-treemerge operation on elementsb-treeorder of merged treeb-treename of output fileb-treetrees to mergeb-treea treeb-treea sized C suitable for passing to NoneR   K      !"#$%&'()*+,-./0123)45678/9:;<=>?@ABCDEFGHIJKLMNOPQRS T UV#b-tree-0.1.4-73dR3A2X0Vu3poq1AAXQQhBTree.BinaryListBTreeBTree.BinaryFile BTree.Types BTree.LookupBuilder BTree.BuilderBTree.BuildUnordered BTree.Walk BTree.Merge BinaryListfilePath toBinaryListopenlengthstream$fBinaryHeader$fShowBinaryList $fShowHeaderBLeafOrderSize LookupTreefromByteStringlookupsizefromOrderedToFilefromOrderedToByteStringfromUnorderedToFile walkLeaves mergeLeaves mergeTreessizedProducerForTreeEpiloguewriteWithHeaderbytestring-0.10.8.2Data.ByteString.Lazy.Internal ByteStringhWriteWithHeaderreadWithHeader BTreeHeader_btRootbase GHC.MaybeNothingNodeOnDiskOffset $fOrdBLeaf $fEqBLeaf$fBinaryBTreeHeader_btSize_btOrder _btVersion_btMagicLeafmagic _ltHeader_ltDatabtMagicbtOrderbtRootbtSize btVersionvalidateHeaderltDataltHeader_dNodes _dNodeCount _dMinFill DiskProducer optimalFill buildNodes buildTreefoldR"pipes-4.3.9-KVXB9KNNvp2DBvV2SPz6LI Pipes.CoreProducerputBS maxChunkMerge splitChunks takeChunkfromUnorderedToList walkNodeswalkNodesWithOffset