Class: Google::Apis::SafebrowsingV4::RiceDeltaEncoding
- Inherits:
-
Object
- Object
- Google::Apis::SafebrowsingV4::RiceDeltaEncoding
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/safebrowsing_v4/classes.rb,
generated/google/apis/safebrowsing_v4/representations.rb,
generated/google/apis/safebrowsing_v4/representations.rb
Overview
The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.
Instance Attribute Summary collapse
-
#encoded_data ⇒ String
The encoded deltas that are encoded using the Golomb-Rice coder.
-
#first_value ⇒ Fixnum
The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value.
-
#num_entries ⇒ Fixnum
The number of entries that are delta encoded in the encoded data.
-
#rice_parameter ⇒ Fixnum
The Golomb-Rice parameter, which is a number between 2 and 28.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RiceDeltaEncoding
constructor
A new instance of RiceDeltaEncoding.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ RiceDeltaEncoding
Returns a new instance of RiceDeltaEncoding
560 561 562 |
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 560 def initialize(**args) update!(**args) end |
Instance Attribute Details
#encoded_data ⇒ String
The encoded deltas that are encoded using the Golomb-Rice coder.
Corresponds to the JSON property encodedData
NOTE: Values are automatically base64 encoded/decoded in the client library.
538 539 540 |
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 538 def encoded_data @encoded_data end |
#first_value ⇒ Fixnum
The offset of the first entry in the encoded data, or, if only a single
integer was encoded, that single integer's value. If the field is empty or
missing, assume zero.
Corresponds to the JSON property firstValue
545 546 547 |
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 545 def first_value @first_value end |
#num_entries ⇒ Fixnum
The number of entries that are delta encoded in the encoded data. If only a
single integer was encoded, this will be zero and the single value will be
stored in first_value
.
Corresponds to the JSON property numEntries
552 553 554 |
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 552 def num_entries @num_entries end |
#rice_parameter ⇒ Fixnum
The Golomb-Rice parameter, which is a number between 2 and 28. This field
is missing (that is, zero) if num_entries
is zero.
Corresponds to the JSON property riceParameter
558 559 560 |
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 558 def rice_parameter @rice_parameter end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
565 566 567 568 569 570 |
# File 'generated/google/apis/safebrowsing_v4/classes.rb', line 565 def update!(**args) @encoded_data = args[:encoded_data] if args.key?(:encoded_data) @first_value = args[:first_value] if args.key?(:first_value) @num_entries = args[:num_entries] if args.key?(:num_entries) @rice_parameter = args[:rice_parameter] if args.key?(:rice_parameter) end |