GithubHelp home page GithubHelp logo

willemt / heapless-bencode Goto Github PK

View Code? Open in Web Editor NEW
50.0 9.0 12.0 53 KB

Bencode reader library that doesn't use the heap. Written in C with a BSD license

Home Page: willemthiart.com

License: Other

C 86.85% Shell 1.84% Makefile 2.00% Python 9.31%

heapless-bencode's Introduction

What?

A bencode reader that doesn't use the heap (ie. malloc/free).

Written in C with a BSD license.

How does it work?

See bencode.h for documentation.

To see the module in action check out:

  • Unit tests within test_bencode.c
  • github.com:willemt/CTorrentFileReader
  • github.com:willemt/CBTTrackerClient

Building

$make

Tradeoffs

If you've got the entire bencoded string in memory, CHeaplessBencodeReader is amazing - it'll do the job great!

Otherwise, if your best access is via a stream (eg. a massive bencoded string that you don't want in memory; or a TCP stream), then https://github.com/willemt/CStreamingBencodeReader is your poison! (Tradeoff: it uses the heap)

heapless-bencode's People

Contributors

willemt avatar billyevans avatar

Stargazers

Benjamin avatar 青文 avatar Jigen avatar Leo LI avatar Homing So avatar PRAVEEN avatar Saptak Bhoumik avatar blade avatar Alexey Sklyar avatar salotz avatar  avatar Sheldon Rupp avatar Roberts Gotlaufs avatar cve avatar  avatar Jimmy Pedersen avatar  avatar Mark Keller avatar yndgle avatar Scott Ivey avatar Souhardya Sardar avatar konata avatar Thomas Meson avatar Antonin Amand avatar Andreas Roussos avatar logan avatar wmb avatar Robert Karl avatar Ruslan R. Laishev avatar  avatar CrackedP0t avatar  avatar  avatar James Forcier avatar Ben Gonzales avatar  avatar Márk Bartos avatar  avatar J. Dekker avatar  avatar Denis avatar Anderson Bravalheri avatar The Dude avatar Courtney Robinson avatar Javier Escalada avatar Alexander Egorov avatar Geoffroy Lorieux avatar  avatar  avatar  avatar

Watchers

 avatar  avatar James Cloos avatar Emanuel Landeholm avatar  avatar  avatar Denis avatar DAVID TIM avatar  avatar

heapless-bencode's Issues

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.