Id32

Just another numeric id encoder/decoder.

License

License

GroupId

GroupId

com.apicatalog
ArtifactId

ArtifactId

id32
Last Version

Last Version

3.0
Release Date

Release Date

Type

Type

jar
Description

Description

Id32
Just another numeric id encoder/decoder.
Project URL

Project URL

https://github.com/filip26/id32
Source Code Management

Source Code Management

https://github.com/filip26/id32

Download id32

How to add to project

<!-- https://jarcasting.com/artifacts/com.apicatalog/id32/ -->
<dependency>
    <groupId>com.apicatalog</groupId>
    <artifactId>id32</artifactId>
    <version>3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.apicatalog/id32/
implementation 'com.apicatalog:id32:3.0'
// https://jarcasting.com/artifacts/com.apicatalog/id32/
implementation ("com.apicatalog:id32:3.0")
'com.apicatalog:id32:jar:3.0'
<dependency org="com.apicatalog" name="id32" rev="3.0">
  <artifact name="id32" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.apicatalog', module='id32', version='3.0')
)
libraryDependencies += "com.apicatalog" % "id32" % "3.0"
[com.apicatalog/id32 "3.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.13.1

Project Modules

There are no modules declared in this project.

Numeric Id Encoder/Decoder.

Just another variation on Base32 encoding.

Java CI with Maven Maintainability Rating Coverage Maven Central License

Goals

  • URL / URI / IRI safe
  • one case letters and digits only
  • low transcription error rate
  • low risk of accidental profanity

Examples

// default alphabet
Id32.encodeLong(823543l) : "3R8Z"
Id32.encodeLong(8922003266371364727l) : "8ZWK1SC2XBJ5Z"
                
Id32.decodeLong("JKYZ3YY") : 10000000000l
Id32.decodeLong("BYYYYY")  : 33554432l

Id32.decodeLong("iphone") == Id32.decodeLong("1PH0NE") : 618545224

// custom alphabet
Id32.encodeLong(123456l, Alphabet.of('X', 'Z', ...));

Default Alphabet

	'Y', 'B', 'N', 'D', 'R',
	'F', 'G', '8', 'E', 'J',
	'K', 'M', 'C', 'P', 'Q', 
	'X', '0', 'T', '1', 'V', 
	'W', 'L', 'S', 'Z', '2',
	'3', '4', '5', 'H', '7', 
	'6', '9' 

Letters A,I,O and U are excluded.

Versions

Version
3.0