Class: Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeStructEncodingOrderedCodeBytes
- Inherits:
-
Object
- Object
- Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeStructEncodingOrderedCodeBytes
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/bigtableadmin_v2/classes.rb,
lib/google/apis/bigtableadmin_v2/representations.rb,
lib/google/apis/bigtableadmin_v2/representations.rb
Overview
Fields are encoded independently, then escaped and delimited by appling the
following rules in order: - While the last remaining field is ASC or
UNSPECIFIED, and encodes to the empty string "", remove it. - In each
remaining field, replace all null bytes 0x00 with the fixed byte pair 0x00,
0xFF. - If any remaining field encodes to the empty string "", replace it
with the fixed byte pair 0x00, 0x00. - Append the fixed byte pair 0x00,
0x01 to each remaining field, except for the last remaining field if it is
ASC. - Bitwise negate all DESC fields. - Concatenate the results, or emit
the fixed byte pair 0x00, 0x00 if there are no remaining fields to
concatenate. Examples: - STRUCT() -> "\00\00" - STRUCT("") -> "\00\00" -
STRUCT("", "") -> "\00\00" - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" -
STRUCT("A", "") -> "A" - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" -
STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C"
Examples for struct with DESC fields: `- STRUCT("" DESC) -> "\xFF\xFF" + "
\xFF\xFE" - STRUCT("" DESC, "") -> "\xFF\xFF" + "\xFF\xFE" - STRUCT("" DESC, ""
, "") -> "\xFF\xFF" + "\xFF\xFE" - STRUCT("" DESC, "A") -> "\xFF\xFF" + "\xFF\
xFE" + "A" - STRUCT("A", "" DESC, "") -> "A" + "\00\01" + "\xFF\xFF" + "\xFF\
xFE" - STRUCT("", "A" DESC) -> "\x00\x00" + "\x00\x01" + "\xBE" + "\xFF\xFE"
Since null bytes are always escaped, this encoding can cause size blowup for
encodings likeInt64.BigEndianBytesthat are likely to produce many such
bytes. Sorted mode: - Fields are encoded in sorted mode. - All values
supported by the field encodings are allowed. - Fields with unset or
UNSPECIFIEDorder are treated asASC. - Element-wise order is preserved:A
< BifA[0] < B[0], or ifA[0] == B[0] && A[1] < B[1]`, etc. Strict
prefixes sort first. Distinct mode: - Fields are encoded in distinct mode. -
All values supported by the field encodings are allowed.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleBigtableAdminV2TypeStructEncodingOrderedCodeBytes
constructor
A new instance of GoogleBigtableAdminV2TypeStructEncodingOrderedCodeBytes.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleBigtableAdminV2TypeStructEncodingOrderedCodeBytes
Returns a new instance of GoogleBigtableAdminV2TypeStructEncodingOrderedCodeBytes.
2555 2556 2557 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 2555 def initialize(**args) update!(**args) end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2560 2561 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 2560 def update!(**args) end |