Constructor
new Filter(optionsnullable)
Create an filter.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<nullable> |
Properties:
Name | Type | Description |
---|---|---|
hash |
Hash | |
index |
Number |
- Source:
Methods
(static) fromJSON(json) → {Filter}
Instantiate filter from json object.
Parameters:
Name | Type | Description |
---|---|---|
json |
Object |
- Source:
Returns:
- Type
- Filter
(static) fromOptions(options) → {Filter}
Instantate outpoint from options object.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
Returns:
- Type
- Filter
(static) fromRaw(data) → {Filter}
Instantiate filter from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
Returns:
- Type
- Filter
(static) fromReader(br) → {Filter}
Instantiate filter from a buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
BufferReader |
- Source:
Returns:
- Type
- Filter
(static) isFilter(obj) → {Boolean}
Test an object to see if it is an filter.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
- Source:
Returns:
- Type
- Boolean
(private) fromJSON()
Inject properties from json object.
- Source:
(private) fromOptions(options)
Inject properties from options object.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
(private) fromRaw(data)
Inject properties from serialized data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
(private) fromReader(br)
Inject properties from buffer reader.
Parameters:
Name | Type | Description |
---|---|---|
br |
BufferReader |
- Source:
getSize() → {Number}
Calculate size of filter.
- Source:
Returns:
- Type
- Number
inspectSymbol() → {String}
Convert the filter to a user-friendly string.
- Source:
Returns:
- Type
- String
toJSON() → {Object}
Convert the filter to an object suitable for JSON serialization.
- Source:
Returns:
- Type
- Object
toRaw() → {Buffer}
Serialize filter.
- Source:
Returns:
- Type
- Buffer
toWriter(bw)
Write filter to a buffer writer.
Parameters:
Name | Type | Description |
---|---|---|
bw |
BufferWriter |
- Source: