_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c9700
// FeedBits ensures that at least nb bits exist in the bit buffer. // If the underlying byteReader is a bufio.Reader, then this will fill the // bit buffer with as many bits as possible, relying on Peek and Discard to // properly advance the read offset. Otherwise, it will use ReadByte to fill the // buffer with just t...
c9701
// ReadBits reads nb bits in LSB order from the underlying reader.
c9702
// ReadSymbol reads the next prefix symbol using the provided prefixDecoder.
c9703
// ReadOffset reads an offset value using the provided rangesCodes indexed by // the given symbol.
c9704
// ReadPrefixCode reads the prefix definition from the stream and initializes // the provided prefixDecoder. The value maxSyms is the alphabet size of the // prefix code being generated. The actual number of representable symbols // will be between 1 and maxSyms, inclusively.
c9705
// readSimplePrefixCode reads the prefix code according to RFC section 3.4.
c9706
// readComplexPrefixCode reads the prefix code according to RFC section 3.5.
c9707
// Apply overwrites all checksum fields in d with the ones in cs.
c9708
// Verify checks that all checksum fields in d matches those in cs.
c9709
// Length computes the total bit-length using the Len and Cnt fields.
c9710
// checkLengths reports whether the codes form a complete prefix tree.
c9711
// checkPrefixes reports whether all codes have non-overlapping prefixes.
c9712
// GeneratePrefixes assigns a prefix value to all codes according to the // bit-lengths. This function is used by both compressors and decompressors. // // The input codes must have the Sym and Len fields populated and be // sorted by symbol. The bit-lengths of each code must be properly allocated, // such that it form...
c9713
// readStreamHeader reads the Brotli stream header according to RFC section 9.1.
c9714
// readBlockHeader reads a meta-block header according to RFC section 9.2.
c9715
// readMetaData reads meta data according to RFC section 9.2.
c9716
// readRawData reads raw data according to RFC section 9.2.
c9717
// readContextMap reads the context map according to RFC section 7.3.
c9718
// readBlockSwitch handles a block switch command according to RFC section 6.
c9719
// setupTLSConfig builds the TLS configuration
c9720
// GetConfigForClient implements the Config.GetClientCertificate callback
c9721
// Decode searches the plugin by name, decodes the provided map into plugin.
c9722
// DefineTimers defines `setTimeout`, `clearTimeout`, `setInterval`, // `clearInterval` into global context.
c9723
// New32WithSeed returns new 32-bit hasher set with explicit seed value
c9724
// New64WithSeed returns a 64-bit hasher set with explicit seed value
c9725
// New128WithSeed returns a 128-bit hasher set with explicit seed value
c9726
//verifyNode walks down the tree until hitting a leaf, calculating the hash at each level //and returning the resulting hash of Node n.
c9727
//calculateNodeHash is a helper function that calculates the hash of the node.
c9728
//NewTree creates a new Merkle Tree using the content cs.
c9729
//buildWithContent is a helper function that for a given set of Contents, generates a //corresponding tree and returns the root node, a list of leaf nodes, and a possible error. //Returns an error if cs contains no Contents.
c9730
//buildIntermediate is a helper function that for a given list of leaf nodes, constructs //the intermediate and root levels of the tree. Returns the resulting root node of the tree.
c9731
//RebuildTree is a helper function that will rebuild the tree reusing only the content that //it holds in the leaves.
c9732
//RebuildTreeWith replaces the content of the tree and does a complete rebuild; while the root of //the tree will be replaced the MerkleTree completely survives this operation. Returns an error if the //list of content cs contains no entries.
c9733
//VerifyTree verify tree validates the hashes at each level of the tree and returns true if the //resulting hash at the root of the tree matches the resulting root hash; returns false otherwise.
c9734
//VerifyContent indicates whether a given content is in the tree and the hashes are valid for that content. //Returns true if the expected Merkle Root is equivalent to the Merkle root calculated on the critical path //for a given content. Returns true if valid and false otherwise.
c9735
//String returns a string representation of the tree. Only leaf nodes are included //in the output.
c9736
// Load imports sql queries from any io.Reader.
c9737
// LoadFromFile imports SQL queries from the file.
c9738
// LoadFromString imports SQL queries from the string.
c9739
// UseLocalCache causes Codec to cache items in local LRU cache.
c9740
// Set caches the item.
c9741
// Exists reports whether object for the given key exists.
c9742
// Get gets the object for the given key.
c9743
// Once gets the item.Object for the given item.Key from the cache or // executes, caches, and returns the results of the given item.Func, // making sure that only one execution is in-flight for a given item.Key // at a time. If a duplicate comes in, the duplicate caller waits for the // original to complete and receiv...
c9744
// Stats returns cache statistics.
c9745
// Prints pattern's SVG string without any argument
c9746
// Generate returns pattern's SVG string
c9747
// Base64String returns pattern's Base64 encoded string
c9748
// URIimage returns pattern's uri image string
c9749
// Hash returns SHA-1 encryption of a string
c9750
// Map returns respective value of a number from a range to different range
c9751
// HexVal returns decimal representation of a substring of a hexa decimal string
c9752
// Merge merges two 'map' objects and returns the resultant object
c9753
// Prints pattern's uri image string
c9754
// New parses the arguments and returns an instance of Pattern struct that has linked // methods to work further things
c9755
// SvgStr returns string representing pattern's SVG string
c9756
// generateBackground decides on background color for the pattern. // // It uses 'color' or 'baseColor' arguments for this task.
c9757
// isPattern decides whether a pattern is a valid one or not
c9758
// genaratePattern decides on type of pattern and build respective SVG object
c9759
// geoChevrons build the chevrons SVG pattern
c9760
// geoConcentricCircles build the concentric_circles SVG pattern
c9761
// geoDiamonds build the diamonds SVG pattern
c9762
// geoMosaicSquares build the mosaic_squares SVG pattern
c9763
// geoNestedSquares build the nested_squares SVG pattern
c9764
// geoOctagons build the octagons SVG pattern
c9765
// geoOverlappingCircles build the overlapping_circles SVG pattern
c9766
// geoOverlappingRings build the overlapping_rings SVG pattern
c9767
// geoPlaid build the plaid SVG pattern
c9768
// geoSineWaves build the sine_waves SVG pattern
c9769
// geoSquares build the squares SVG pattern
c9770
// geoTriangles build the triangles SVG pattern
c9771
// BuildOctagon returns string representing an octagon shape
c9772
// BuildTriangle returns string representing a triangle shape
c9773
// BuildDiamond returns string representing a diamond shape
c9774
// BuildRotatedTriangle returns string representing a rotated triangle shape
c9775
// BuildHexagon returns string representing a hexagon shape
c9776
// BuildChevron returns string representing a chevron shape
c9777
// BuildPlus returns string representing an plus shape
c9778
// DrawOuterMosaicTile returns string representing an outer mosaic tile shape
c9779
// Str returns string representing whole SVG object
c9780
// Rect adds a rectangle element to SVG object
c9781
// Circle adds a circle element to SVG object
c9782
// Path adds a path element to SVG object
c9783
// Polyline adds a polyline element to SVG object
c9784
// Group adds a group element to SVG object. // // It groups optionally provided elements together.
c9785
// WriteArgs adds additional attributes to a SVG elements. // // It parses provides 'map' arguments to add attributes to SVG element.
c9786
// Prints pattern's Base64 encoded string
c9787
// Text returns the UTF-8 text content from the Response body.
c9788
// adapterFor returns an Adapter for the given host. // If it cannot find a specific named Adapter, it will return a the default Adapter. // It will always return a valid Adapter.
c9789
// NewResponse initializes a new whois response.
c9790
// String returns a string representation of the response text. // Returns an empty string if an error occurs.
c9791
// Reader returns a new UTF-8 io.Reader for the response body.
c9792
// Encoding returns an Encoding for the response body.
c9793
// DetectContentType detects and sets the response content type and charset.
c9794
// DetectCharset returns best guess for the reesponse body character set.
c9795
// Checksum returns a hex-encoded SHA-1 checksum of the response Body.
c9796
// Header returns a stringproto header representing the response.
c9797
// ContentType returns an RFC 2045 compatible internet media type string.
c9798
// WriteMIME writes a MIME-formatted representation of the response to an io.Writer.
c9799
// ReadMIME reads a MIME-formatted representation of the response into a Response.