Code Monkey home page Code Monkey logo

ulid-c's Introduction

ULID Library (C99)

This is a library for generating and handling Universally Unique Lexicographically Sortable Identifiers (ULIDs). On modern hardware running Linux, it can generate 68 million ULIDs per second (50 cycles per ULID). Supported operating systems: POSIX and Win32.

This repository also includes a ulidgen command line utility for generating, validating, and inspecting ULIDs.

Documentation

The complete API documentation is found in ulid.h. Here's summary of the available functions:

int  ulid_generator_init(struct ulid_generator *, int flags);
void ulid_generate(struct ulid_generator *, char[27]);
void ulid_encode(char[27], const unsigned char[16]);
int  ulid_decode(unsigned char[16], const char *);

Here are the command line switches for ulidgen:

usage: ulidgen -G [-prs] [-n N]
       ulidgen -C [-iq] <ULIDs...>
       ulidgen -T [-i] <ULIDs...>
       ulidgen -h
  -G      Generate ULIDs
  -C      Check/validate ULIDs
  -T      Print timestamp from ULIDs
  -h      Display this help message
  -i      (-C|-T) Read ULIDs on standard input
  -n N    (-G) Number of ULIDs to generate [1]
  -p      (-G) Only use 79 random bits to avoid overflow
  -q      (-C) Don't print invalid ULIDs
  -r      (-G) Non-monotonic ULIDs within timestamp
  -s      (-G) Require secure initialization

ulid-c's People

Contributors

skeeto avatar

Stargazers

Denys avatar DerSkythe avatar Jevin Sweval avatar  avatar HARSH MISRA avatar  avatar James Sofios avatar Arshin Albab avatar Thomas Hope avatar  avatar Hussein Layth AlMadhachi avatar xuechao yan avatar Nicholas Ochoa avatar  avatar  avatar Helton Reis avatar  avatar  avatar Weston Schmidt avatar Evgeniy Terekhin avatar Marc avatar Shad Amethyst avatar Bruno Dias avatar  avatar Jan Viktor Apel avatar Sergey avatar Camilo avatar Krispin Schulz avatar Christopher Layne avatar Eric Johnson avatar Dmitry Ledentsov avatar Michael Williams avatar Alexandre Larouche avatar Dimitri Diakopoulos avatar Vu Le avatar Mykola Konyk avatar alxm //// avatar Alex Dixon avatar Borislav Stanimirov avatar  avatar David Busby avatar Anner van Hardenbroek avatar yndgle avatar Fabian avatar Sam Gaw avatar Ritchie J. Latimore avatar Takahashi Kenji avatar Trung TM avatar  avatar Ilmari Vacklin avatar Markus Fisch avatar Jonathan McHugh avatar Josh Junon avatar Trung Kien avatar Kyle Swanson avatar Arvid Gerstmann avatar gdinit avatar Giorgi Chakhidze avatar Yoan avatar Mahyar Koshkouei avatar

Watchers

 avatar Jevin Sweval avatar James Cloos avatar  avatar

ulid-c's Issues

Windows binary

Dear @skeeto,
Could you be so kind to generate .exe for the rest of us who use Windows 7 x64 w/o C?

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.