_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c9600 | train | // IsHTTPError indicates whether the passed error is a
// HTTP error. | {
"resource": ""
} | ||
c9601 | train | // IsNetworkError indicates whether the passed error is a
// network error. | {
"resource": ""
} | ||
c9602 | train | // IsServiceNotFoundError indicates whether the passed error occurred due to
// the requested service not being found. | {
"resource": ""
} | ||
c9603 | train | // IsTimeoutError verifies whether or not the cause for an error is a timeout. | {
"resource": ""
} | ||
c9604 | train | // IsAuthenticationError verifies whether or not the cause for an error is an authentication error. | {
"resource": ""
} | ||
c9605 | train | // IsBucketMissingError verifies whether or not the cause for an error is a bucket missing error. | {
"resource": ""
} | ||
c9606 | train | // IsAccessError verifies whether or not the cause for an error is an access error. | {
"resource": ""
} | ||
c9607 | train | // IsConfigurationError verifies whether or not the cause for an error is a configuration error. | {
"resource": ""
} | ||
c9608 | train | // IsSubdocPathNotFoundError verifies whether or not the cause for an error is due to a subdoc operation path not found. | {
"resource": ""
} | ||
c9609 | train | // IsDurabilityError verifies whether or not the cause for an error is due to a durability error. | {
"resource": ""
} | ||
c9610 | train | // IsNoResultsError verifies whether or not the cause for an error is due no results being available to a query. | {
"resource": ""
} | ||
c9611 | train | // NextBytes returns the next result from the results as a byte array. | {
"resource": ""
} | ||
c9612 | train | // AnalyticsQuery performs an analytics query and returns a list of rows or an error. | {
"resource": ""
} | ||
c9613 | train | // ListenAndServe is a drop-in replacement for
// http.ListenAndServe for use within AWS Lambda.
//
// ListenAndServe always returns a non-nil error. | {
"resource": ""
} | ||
c9614 | train | // newContext returns a new Context with specific api gateway proxy values. | {
"resource": ""
} | ||
c9615 | train | // RequestContext returns the APIGatewayProxyRequestContext value stored in ctx. | {
"resource": ""
} | ||
c9616 | train | // Header implementation. | {
"resource": ""
} | ||
c9617 | train | // Write implementation. | {
"resource": ""
} | ||
c9618 | train | // WriteHeader implementation. | {
"resource": ""
} | ||
c9619 | train | // End the request. | {
"resource": ""
} | ||
c9620 | train | // isBinary returns true if the response reprensents binary. | {
"resource": ""
} | ||
c9621 | train | // isTextMime returns true if the content type represents textual data. | {
"resource": ""
} | ||
c9622 | train | // NewRequest returns a new http.Request from the given Lambda event. | {
"resource": ""
} | ||
c9623 | train | // BitsWritten reports the total number of bits issued to any Write method. | {
"resource": ""
} | ||
c9624 | train | // WritePads writes 0-7 bits to the bit buffer to achieve byte-alignment. | {
"resource": ""
} | ||
c9625 | train | // Write writes bytes from buf.
// The bit-ordering mode does not affect this method. | {
"resource": ""
} | ||
c9626 | train | // TryWriteBits attempts to write nb bits using the contents of the bit buffer
// alone. It reports whether it succeeded.
//
// This method is designed to be inlined for performance reasons. | {
"resource": ""
} | ||
c9627 | train | // WriteBits writes nb bits of v to the underlying writer. | {
"resource": ""
} | ||
c9628 | train | // TryWriteSymbol attempts to encode the next symbol using the contents of the
// bit buffer alone. It reports whether it succeeded.
//
// This method is designed to be inlined for performance reasons. | {
"resource": ""
} | ||
c9629 | train | // WriteSymbol writes the symbol using the provided prefix Encoder. | {
"resource": ""
} | ||
c9630 | train | // Flush flushes all complete bytes from the bit buffer to the byte buffer, and
// then flushes all bytes in the byte buffer to the underlying writer.
// After this call, the bit Writer is will only withhold 7 bits at most. | {
"resource": ""
} | ||
c9631 | train | // PushBits pushes as many bytes as possible from the bit buffer to the byte
// buffer, reporting the number of bits pushed. | {
"resource": ""
} | ||
c9632 | train | // getFiles returns a list of files found by applying the glob matching on
// all the specified paths. This function ignores any errors. | {
"resource": ""
} | ||
c9633 | train | // errWrap converts a lower-level errors.Error to be one from this package.
// The replaceCode passed in will be used to replace the code for any errors
// with the errors.Invalid code.
//
// For the Reader, set this to errors.Corrupted.
// For the Writer, set this to errors.Internal. | {
"resource": ""
} | ||
c9634 | train | // reverseUint32 reverses all bits of v. | {
"resource": ""
} | ||
c9635 | train | // NewReader creates a new Reader reading from the given reader.
// If rd does not also implement compress.ByteReader or compress.BufferedReader,
// then the decoder may read more data than necessary from rd. | {
"resource": ""
} | ||
c9636 | train | // Reset discards the Reader's state and makes it equivalent to the result
// of a call to NewReader, but reading from rd instead.
//
// This is used to reduce memory allocations. | {
"resource": ""
} | ||
c9637 | train | // Read reads the decoded meta data from the underlying io.Reader.
// This returns io.EOF either when a meta block with final bits set is found or
// when io.EOF is hit in the underlying reader. | {
"resource": ""
} | ||
c9638 | train | // Close ends the meta stream.
// The FinalMode encountered becomes valid after calling Close. | {
"resource": ""
} | ||
c9639 | train | // initContextLUTs computes LUTs so that context ID computation can be
// efficiently without any branches. | {
"resource": ""
} | ||
c9640 | train | // getLitContextID computes the context ID for literals from RFC section 7.1.
// Bytes p1 and p2 are the last and second-to-last byte, respectively. | {
"resource": ""
} | ||
c9641 | train | // HistSize reports the total amount of historical data in the dictionary. | {
"resource": ""
} | ||
c9642 | train | // ReadFlush returns a slice of the historical buffer that is ready to be
// emitted to the user. A call to ReadFlush is only valid after all of the data
// from a previous call to ReadFlush has been consumed. | {
"resource": ""
} | ||
c9643 | train | // LastBytes reports the last 2 bytes in the dictionary. If they do not exist,
// then zero values are returned. | {
"resource": ""
} | ||
c9644 | train | // setDefaults configures the top-level parameters with default values.
// This function method must be called after all init functions have executed
// since they register the various codecs. | {
"resource": ""
} | ||
c9645 | train | // intName returns a shorter representation of the input integer.
// It uses scientific notation for exact powers of 10.
// It uses SI suffixes for powers of 1024.
// If the number is small enough, it will be printed as is. | {
"resource": ""
} | ||
c9646 | train | // BitsRead reports the total number of bits emitted from any Read method. | {
"resource": ""
} | ||
c9647 | train | // Read reads bytes into buf.
// The bit-ordering mode does not affect this method. | {
"resource": ""
} | ||
c9648 | train | // ReadOffset reads an offset value using the provided RangeCodes indexed by
// the symbol read. | {
"resource": ""
} | ||
c9649 | train | // ReadBits reads nb bits in from the underlying reader. | {
"resource": ""
} | ||
c9650 | train | // ReadSymbol reads the next symbol using the provided prefix Decoder. | {
"resource": ""
} | ||
c9651 | train | // Flush updates the read offset of the underlying ByteReader.
// If reader is a compress.BufferedReader, then this calls Discard to update
// the read offset. | {
"resource": ""
} | ||
c9652 | train | // transformUppercase transform the word to be in uppercase using the algorithm
// presented in RFC section 8. If once is set, then loop only executes once. | {
"resource": ""
} | ||
c9653 | train | // BenchmarkEncoder benchmarks a single encoder on the given input data using
// the selected compression level and reports the result. | {
"resource": ""
} | ||
c9654 | train | // BenchmarkDecoder benchmarks a single decoder on the given pre-compressed
// input data and reports the result. | {
"resource": ""
} | ||
c9655 | train | // Init initializes Encoder according to the codes provided. | {
"resource": ""
} | ||
c9656 | train | // decodeMeta attempts to decode the metadata.
// If successful, it verifies that meta-encoded blocks are DEFLATE blocks. | {
"resource": ""
} | ||
c9657 | train | // decompressMeta attempts to decompress the meta-encoded blocks.
// It expects decompression to succeed and to output nothing. | {
"resource": ""
} | ||
c9658 | train | // We dynamically compute NWORDS and DOFFSET according to the algorithm
// provided in RFC section 8. | {
"resource": ""
} | ||
c9659 | train | // MakeRangeCodes creates a RangeCodes, where each region is assumed to be
// contiguously stacked, without any gaps, with bit-lengths taken from bits. | {
"resource": ""
} | ||
c9660 | train | // RFC section 3.2.7 allows degenerate prefix trees with only node, but requires
// a single bit for that node. This causes an unbalanced tree where the "1" code
// is unused. The canonical prefix code generation algorithm breaks with this.
//
// To handle this case, we artificially insert another node for the "1" code... | {
"resource": ""
} | ||
c9661 | train | // ReverseUint32 reverses all bits of v. | {
"resource": ""
} | ||
c9662 | train | // ReverseUint32N reverses the lower n bits of v. | {
"resource": ""
} | ||
c9663 | train | // ReverseUint64 reverses all bits of v. | {
"resource": ""
} | ||
c9664 | train | // ReverseUint64N reverses the lower n bits of v. | {
"resource": ""
} | ||
c9665 | train | // ReverseSearch searches for a meta header in reverse. This returns the last
// index where the header was found. If not found, it returns -1. | {
"resource": ""
} | ||
c9666 | train | // numBits counts the number of zero and one bits in the byte. | {
"resource": ""
} | ||
c9667 | train | // NewReader creates a new Reader reading the given reader rs. This reader can
// only decompress files in the XFLATE format. If the underlying stream is
// regular DEFLATE and not XFLATE, then this returns error.
//
// Regardless of the current offset in rs, this function Seeks to the end of rs
// in order to determin... | {
"resource": ""
} | ||
c9668 | train | // Reset discards the Reader's state and makes it equivalent to the result
// of a call to NewReader, but reading from rd instead. This method may return
// an error if it is unable to parse the index.
//
// This is used to reduce memory allocations. | {
"resource": ""
} | ||
c9669 | train | // Read reads decompressed data from the underlying io.Reader.
// This method automatically proceeds to the next chunk when the current one
// has been fully read. | {
"resource": ""
} | ||
c9670 | train | // Seek sets the offset for the next Read operation, interpreted according to
// the whence value provided. It is permitted to seek to offsets in the middle
// of a compressed chunk. The next call to Read will automatically discard some
// number of bytes before returning the requested data. | {
"resource": ""
} | ||
c9671 | train | // Close ends the XFLATE stream. | {
"resource": ""
} | ||
c9672 | train | // decodeIndexes iteratively decodes all of the indexes in the XFLATE stream.
// Even if the index is fragmented in the source stream, this method will merge
// all of the index fragments into a single index table. | {
"resource": ""
} | ||
c9673 | train | // decodeIndex decodes the index from a meta encoded stream.
// The current offset must be set to the start of the encoded index and
// index.IndexSize must be populated. If successful, the index.Records and
// index.BackSize fields will be populated. This method will attempt to reset
// the read offset to the start of... | {
"resource": ""
} | ||
c9674 | train | // decodeFooter seeks to the end of the stream, searches for the footer
// and decodes it. If successful, it will return the backSize for the preceding
// index and the size of the footer itself. This method will attempt to reset
// the read offset to the start of the footer. | {
"resource": ""
} | ||
c9675 | train | // AppendRecord appends a new record to the end of the index and reports whether
// the operation was successful or not. | {
"resource": ""
} | ||
c9676 | train | // AppendIndex appends the contents of another index onto the current receiver
// and reports whether the operation was successful or not. | {
"resource": ""
} | ||
c9677 | train | // GetRecords returns the previous and current records at the given position.
// This method will automatically bind the search position within the bounds
// of the index. Thus, this will return zero value records if the position is
// too low, and the last record if the value is too high. | {
"resource": ""
} | ||
c9678 | train | // LastRecord returns the last record if it exists, otherwise the zero value. | {
"resource": ""
} | ||
c9679 | train | // update reslices the internal buffer to be consistent with the read offset. | {
"resource": ""
} | ||
c9680 | train | // computeRecords computes the records the raw input size and the compressed
// output size. strmRec is a single record for when the input is compressed as
// a single stream. chnkRecs is a list of records for when the input is
// compressed individually as chunks. | {
"resource": ""
} | ||
c9681 | train | // compress compresses the input buffer at the given level. | {
"resource": ""
} | ||
c9682 | train | // encode encodes the input using XFLATE's meta encoding. | {
"resource": ""
} | ||
c9683 | train | // NewWriter creates a new Writer writing to the given writer.
// It is the caller's responsibility to call Close to complete the stream.
//
// If conf is nil, then default configuration values are used. Writer copies
// all configuration values as necessary and does not store conf. | {
"resource": ""
} | ||
c9684 | train | // Reset discards the Writer's state and makes it equivalent to the result
// of a call to NewWriter, but writes to wr instead. Any configurations from
// a prior call to NewWriter will be preserved.
//
// This is used to reduce memory allocations. | {
"resource": ""
} | ||
c9685 | train | // Write writes the compressed form of buf to the underlying io.Writer.
// This automatically breaks the input into multiple chunks, writes them out,
// and records the sizes of each chunk in the index table. | {
"resource": ""
} | ||
c9686 | train | // Flush flushes the current write buffer to the underlying writer.
// Flushing is entirely optional and should be used sparingly. | {
"resource": ""
} | ||
c9687 | train | // Close ends the XFLATE stream and flushes all buffered data.
// This method automatically writes an index if any chunks have been written
// since the last FlushIndex. | {
"resource": ""
} | ||
c9688 | train | // encodeIndex encodes the index into a meta encoded stream.
// The index.Records and index.BackSize fields must be populated.
// The index.IndexSize field will be populated upon successful write. | {
"resource": ""
} | ||
c9689 | train | // encodeFooter writes the final footer, encoding the provided backSize into it. | {
"resource": ""
} | ||
c9690 | train | // NewWriter creates a new Writer writing to the given writer.
// It is the caller's responsibility to call Close to complete the meta stream. | {
"resource": ""
} | ||
c9691 | train | // Reset discards the Writer's state and makes it equivalent to the result
// of a call to NewWriter, but writes to wr instead.
//
// This is used to reduce memory allocations. | {
"resource": ""
} | ||
c9692 | train | // Write writes the encoded form of buf to the underlying io.Writer.
// The Writer may buffer the input in order to produce larger meta blocks. | {
"resource": ""
} | ||
c9693 | train | // Close ends the meta stream and flushes all buffered data.
// The desired FinalMode must be set prior to calling Close. | {
"resource": ""
} | ||
c9694 | train | // update computes the CRC-32 of appending buf to c. | {
"resource": ""
} | ||
c9695 | train | // readBlockHeader reads the block header according to RFC section 3.2.3. | {
"resource": ""
} | ||
c9696 | train | // readRawData reads raw data according to RFC section 3.2.4. | {
"resource": ""
} | ||
c9697 | train | // readCommands reads block commands according to RFC section 3.2.3. | {
"resource": ""
} | ||
c9698 | train | // finishBlock checks if we have hit io.EOF. | {
"resource": ""
} | ||
c9699 | train | // FlushOffset updates the read offset of the underlying byteReader.
// If the byteReader is a bufio.Reader, then this calls Discard to update the
// read offset. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.