Git Product home page Git Product logo

common's Introduction

WARNING: This project has been superseded by Util, which is GWT-compatible: @see https://github.com/skunkiferous/Util

This project unites several utility projects together:

Common

Common functionality, shared by most on BlockWithMe projects.

TODO: Test!

Base40

Base-40 implementation in Java. Useful for packing a readable small string in a Java long.

The problem: How can I assing human-readable names/IDs to things, while not having to pay the overhead of a String object?

The solution: Limit the character set of the characters of the name to the minimum, and pack the letters in a long. So, the first obvious possibility, is to use Base36, which is a well-known encoding. Unfortunatly, Base-36 makes poor use of the full range of a long. It allows for identifiers of lenght 13 (12 character can use the full character set range). So how do we make better use of the full range of the 64 bit longs? By growing the character set, until we cannot store 12 full-range characters in it anymore. That gives us an improved character set of 40 characters. That is a 1/9 improvemnet. Since there is no unique set of 4 additional characters that will fit all use-cases, those are configurable.

Primitiveable

Interfaces used to define converter objects, that can turn some object to and from a Java primitive value.

common's People

Contributors

skunkiferous avatar tarung avatar

Watchers

 avatar  avatar  avatar

common's Issues

Create Int-to-Int Map-As-A-int[] helper class

It would be possible to implement an int-to-int immutable mapping as one single int[], making it the most lightweight map possible.

We need an helper class that can do that. It should also support (char/short/enum)+(char/short/enum) as key.

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.