https://github.com/levelfourab/ylem-ids
Generate, encode and decode identifiers
https://github.com/levelfourab/ylem-ids
Last synced: 27 days ago
JSON representation
Generate, encode and decode identifiers
- Host: GitHub
- URL: https://github.com/levelfourab/ylem-ids
- Owner: LevelFourAB
- License: mit
- Created: 2020-07-31T08:06:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-22T17:58:16.000Z (almost 5 years ago)
- Last Synced: 2025-07-03T21:53:32.886Z (8 months ago)
- Language: Java
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ylem-ids
The `ylem-ids` project contains code for working with identifiers, such
as generating them via `LongIdGenerator` and encoding/decoding them using
`LongIdCodec`.
## Example
```java
// Generate identifiers
LongIdGenerator ids = new SimpleLongIdGenerator();
long id = ids.next();
// Encoding and decoding
LongIdCodec codec = new Base62LongIdCodec();
String encoded = codec.encode(id);
long decoded = codec.decode(encoded);
```
## License
This project is licensed under the [MIT license](https://opensource.org/licenses/MIT),
see the file `LICENSE.md` for details.