Try the Date/Time format I created #178648
Answered
by
ghost
DanexCodr
asked this question in
Other Feature Feedback, Questions, & Ideas
Select Topic AreaGeneral BodyTitle: ❓ Questions & Help Description: Ask anything here! Whether it's:
We're here to help! 🤝 |
Answered by
ghost
Nov 2, 2025
Replies: 2 comments 2 replies
|
I’ve experimented with BitDT integration in one of my Java micro-utilities for time tracking and logging. Here’s a small example comparing standard ISO timestamps vs BitDT’s compact form: import java.time.Instant;
import java.time.format.DateTimeFormatter;
public class BitDTExample {
// Simple BitDT-style ultra-compressed timestamp (Base36)
public static String toBitDT(long epochMillis) {
return Long.toString(epochMillis, 36).toUpperCase();
}
public static long fromBitDT(String bitdt) {
return Long.parseLong(bitdt.toLowerCase(), 36);
}
public static void main(String[] args) {
long now = System.currentTimeMillis();
// Normal ISO timestamp
String iso = DateTimeFormatter.ISO_INSTANT.format(Instant.ofEpochMilli(now));
// BitDT compressed form
String bitdt = toBitDT(now);
System.out.println("ISO: " + iso);
System.out.println("BitDT: " + bitdt);
System.out.println("Decoded back: " + fromBitDT(bitdt));
}
}
In my case, each log entry shrank from 29 bytes (ISO) to around 9 bytes (BitDT) —
~68% space reduction per timestamp field 🚀
I also found that the conversion cost is negligible for real-time logging and database inserts.
For distributed logs or IoT telemetry, this can make a big difference.
Has anyone tried mixing BitDT with Base58 or zstd for combined optimization? |
2 replies
Answer selected by
DanexCodr
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’ve experimented with BitDT integration in one of my Java micro-utilities for time tracking and logging.
Here’s a small example comparing standard ISO timestamps vs BitDT’s compact form: