_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c9600
// IsHTTPError indicates whether the passed error is a // HTTP error.
c9601
// IsNetworkError indicates whether the passed error is a // network error.
c9602
// IsServiceNotFoundError indicates whether the passed error occurred due to // the requested service not being found.
c9603
// IsTimeoutError verifies whether or not the cause for an error is a timeout.
c9604
// IsAuthenticationError verifies whether or not the cause for an error is an authentication error.
c9605
// IsBucketMissingError verifies whether or not the cause for an error is a bucket missing error.
c9606
// IsAccessError verifies whether or not the cause for an error is an access error.
c9607
// IsConfigurationError verifies whether or not the cause for an error is a configuration error.
c9608
// IsSubdocPathNotFoundError verifies whether or not the cause for an error is due to a subdoc operation path not found.
c9609
// IsDurabilityError verifies whether or not the cause for an error is due to a durability error.
c9610
// IsNoResultsError verifies whether or not the cause for an error is due no results being available to a query.
c9611
// NextBytes returns the next result from the results as a byte array.
c9612
// AnalyticsQuery performs an analytics query and returns a list of rows or an error.
c9613
// ListenAndServe is a drop-in replacement for // http.ListenAndServe for use within AWS Lambda. // // ListenAndServe always returns a non-nil error.
c9614
// newContext returns a new Context with specific api gateway proxy values.
c9615
// RequestContext returns the APIGatewayProxyRequestContext value stored in ctx.
c9616
// Header implementation.
c9617
// Write implementation.
c9618
// WriteHeader implementation.
c9619
// End the request.
c9620
// isBinary returns true if the response reprensents binary.
c9621
// isTextMime returns true if the content type represents textual data.
c9622
// NewRequest returns a new http.Request from the given Lambda event.
c9623
// BitsWritten reports the total number of bits issued to any Write method.
c9624
// WritePads writes 0-7 bits to the bit buffer to achieve byte-alignment.
c9625
// Write writes bytes from buf. // The bit-ordering mode does not affect this method.
c9626
// 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.
c9627
// WriteBits writes nb bits of v to the underlying writer.
c9628
// 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.
c9629
// WriteSymbol writes the symbol using the provided prefix Encoder.
c9630
// 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.
c9631
// PushBits pushes as many bytes as possible from the bit buffer to the byte // buffer, reporting the number of bits pushed.
c9632
// getFiles returns a list of files found by applying the glob matching on // all the specified paths. This function ignores any errors.
c9633
// 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.
c9634
// reverseUint32 reverses all bits of v.
c9635
// 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.
c9636
// 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.
c9637
// 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.
c9638
// Close ends the meta stream. // The FinalMode encountered becomes valid after calling Close.
c9639
// initContextLUTs computes LUTs so that context ID computation can be // efficiently without any branches.
c9640
// 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.
c9641
// HistSize reports the total amount of historical data in the dictionary.
c9642
// 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.
c9643
// LastBytes reports the last 2 bytes in the dictionary. If they do not exist, // then zero values are returned.
c9644
// 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.
c9645
// 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.
c9646
// BitsRead reports the total number of bits emitted from any Read method.
c9647
// Read reads bytes into buf. // The bit-ordering mode does not affect this method.
c9648
// ReadOffset reads an offset value using the provided RangeCodes indexed by // the symbol read.
c9649
// ReadBits reads nb bits in from the underlying reader.
c9650
// ReadSymbol reads the next symbol using the provided prefix Decoder.
c9651
// Flush updates the read offset of the underlying ByteReader. // If reader is a compress.BufferedReader, then this calls Discard to update // the read offset.
c9652
// 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.
c9653
// BenchmarkEncoder benchmarks a single encoder on the given input data using // the selected compression level and reports the result.
c9654
// BenchmarkDecoder benchmarks a single decoder on the given pre-compressed // input data and reports the result.
c9655
// Init initializes Encoder according to the codes provided.
c9656
// decodeMeta attempts to decode the metadata. // If successful, it verifies that meta-encoded blocks are DEFLATE blocks.
c9657
// decompressMeta attempts to decompress the meta-encoded blocks. // It expects decompression to succeed and to output nothing.
c9658
// We dynamically compute NWORDS and DOFFSET according to the algorithm // provided in RFC section 8.
c9659
// MakeRangeCodes creates a RangeCodes, where each region is assumed to be // contiguously stacked, without any gaps, with bit-lengths taken from bits.
c9660
// 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...
c9661
// ReverseUint32 reverses all bits of v.
c9662
// ReverseUint32N reverses the lower n bits of v.
c9663
// ReverseUint64 reverses all bits of v.
c9664
// ReverseUint64N reverses the lower n bits of v.
c9665
// ReverseSearch searches for a meta header in reverse. This returns the last // index where the header was found. If not found, it returns -1.
c9666
// numBits counts the number of zero and one bits in the byte.
c9667
// 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...
c9668
// 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.
c9669
// 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.
c9670
// 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.
c9671
// Close ends the XFLATE stream.
c9672
// 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.
c9673
// 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...
c9674
// 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.
c9675
// AppendRecord appends a new record to the end of the index and reports whether // the operation was successful or not.
c9676
// AppendIndex appends the contents of another index onto the current receiver // and reports whether the operation was successful or not.
c9677
// 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.
c9678
// LastRecord returns the last record if it exists, otherwise the zero value.
c9679
// update reslices the internal buffer to be consistent with the read offset.
c9680
// 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.
c9681
// compress compresses the input buffer at the given level.
c9682
// encode encodes the input using XFLATE's meta encoding.
c9683
// 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.
c9684
// 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.
c9685
// 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.
c9686
// Flush flushes the current write buffer to the underlying writer. // Flushing is entirely optional and should be used sparingly.
c9687
// 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.
c9688
// 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.
c9689
// encodeFooter writes the final footer, encoding the provided backSize into it.
c9690
// NewWriter creates a new Writer writing to the given writer. // It is the caller's responsibility to call Close to complete the meta stream.
c9691
// 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.
c9692
// 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.
c9693
// Close ends the meta stream and flushes all buffered data. // The desired FinalMode must be set prior to calling Close.
c9694
// update computes the CRC-32 of appending buf to c.
c9695
// readBlockHeader reads the block header according to RFC section 3.2.3.
c9696
// readRawData reads raw data according to RFC section 3.2.4.
c9697
// readCommands reads block commands according to RFC section 3.2.3.
c9698
// finishBlock checks if we have hit io.EOF.
c9699
// 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.