Code Monkey home page Code Monkey logo

zoossh's Introduction

zoossh logo

Overview

zoossh is a parser written in Go for Tor-specific data formats. In case you are wondering, "zoossh" is the sound it makes when such documents are parsed! Though admittedly, the speed mostly comes from zoossh being implemented in a compiled language and not because the parsing code is particularly sophisticated.

At this point, zoossh should not be used in practice because the APIs are not yet stable.

Supported file formats

The following file formats are currently partially supported. For more information about file formats, have a look at CollecTor.

  • Server descriptors (@type server-descriptor 1.0)
  • Network status consensuses (@type network-status-consensus-3 1.0)

Examples

Here's how you can parse a network status document and iterate over all relay statuses:

consensus, err := zoossh.ParseConsensusFile(fileName)
if err != nil {
    // Handle error.
}

for status := range consensus.Iterate() {
    fmt.Println(status)
}

Similarly, here's how you can parse a file containing server descriptors:

descriptors, err := zoossh.ParseDescriptorFile(fileName)
if err != nil {
    // Handle error.
}

for desc := range descriptors.Iterate() {
    fmt.Println(desc)
}

Alternatives

Check out the Python library Stem or the Java library metrics-lib.

Contact

Contact: Philipp Winter [email protected]
OpenPGP fingerprint: B369 E7A2 18FE CEAD EB96 8C73 CF70 89E3 D7FD C0D0

zoossh's People

Contributors

nullhypothesis avatar dmgawel avatar

Watchers

 avatar Marcin Słowik avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.