base85

A shorter UUID, ASCII85 with PHP

前提是你 提交于 2019-12-07 19:03:23
问题 I read about the UUID v4 and it's virtually unique, and that's what I need. The problem is, it's a too large number, is it possible to generate UUID's like Facebook or Twitter with fewer characters? I read some post, where you can shrink this code to 20 with Ascii85, but don't see a reliable PHP script doing the job. Someone knows a tested class?? for random ID's it the best way to store this 20 char, right? --- Edit --- @David Schwartz Thanks. I need a random unique identifier in a single

A shorter UUID, ASCII85 with PHP

瘦欲@ 提交于 2019-12-06 12:43:48
I read about the UUID v4 and it's virtually unique, and that's what I need. The problem is, it's a too large number, is it possible to generate UUID's like Facebook or Twitter with fewer characters? I read some post, where you can shrink this code to 20 with Ascii85, but don't see a reliable PHP script doing the job. Someone knows a tested class?? for random ID's it the best way to store this 20 char, right? --- Edit --- @David Schwartz Thanks. I need a random unique identifier in a single server, between 8 and 16 chars (ok 20 is fine if its the lowest). The idea it's to identify objets with

Base85 aka ASCII85 java projects [closed]

走远了吗. 提交于 2019-11-28 05:04:57
问题 Does anyone know about any other than com.idataconnect.lib.ascii85codec java projects that do something like org.apache.commons.codec.binary.Base64 class? 回答1: I found this project that seems to do the trick: http://pdfbox.apache.org/downloads.html#recent Following class encodes and decodes. Code reviews and suggestions are very welcome: import org.apache.pdfbox.io.ASCII85InputStream; import org.apache.pdfbox.io.ASCII85OutputStream; import java.io.ByteArrayInputStream; import java.io