New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

minisketch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minisketch

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Minisketch binding for ruby Build Status Gem Version

This is a wrapper around libminisketch for efficient set reconciliation.

Installation

Install libminisketch

Since this library is an FFI wrapper, libminisketch must be installed beforehand.

If the library is installed in an unusual location, the environment variable [LIBMINISKETCH] can be used to specify the path to the library.

Install gem

Add this line to your application's Gemfile:

gem 'minisketch'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install minisketch

Usage

Functions exposed in libminisketch.h can be accessed using the Minisketch class.

require 'minisketch'

# Create new sketch
sketch = Minisketch.create(12, 0, 4)

# Add element to sketch
sketch.add(3000)
# or
sketch << 3001

# Serialize
sketch.serialize

# Decode
decoded = sketch.decode

another_sketch = Minisketch.create(12, 0, 4)
another_sketch << 3000
another_sketch << 3002

# Merge another sketch
sketch.merge(another_sketch)

This library has been tested based on commit a571ba2 of libminisketch.

FAQs

Package last updated on 01 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc