1. Re[2]: Suggestion for EDS
- Posted by aku at inbox.as May 25, 2001
- 392 views
R> Aku writes: >> 1. if user stores a sequence, make EDS can check if it is >> a string (all bytes 0-255). If yes, store as string (just use 1 >> byte per atom). If not, store as usual. If this is make EDS slower >> make function enable_string() and disable_string() for example. >> So I can store contents of a 1 MB file without having a 4 MB .edb >> file. R> EDS only uses one byte per character for strings R> (except for extremely rare cases where 2 bytes might be used). R> There's also a couple of bytes of overhead. Sorry I dont know that. but if: include database.e procedure x(object notused) end procedure x(db_create("tes",DB_LOCK_NO)) x(db_open("tes",DB_LOCK_NO)) x(db_create_table("file")) x(db_select_table("file")) object isi isi = {} for i=1 to 1000000 do isi &= 254 -- large atom end for x(db_insert("file",isi)) db_close() the database file size is 3MB (3 bytes per atom) R> See compress()/decompress() in database.e >> 2. can make autonumber especially for record keys. >> and add indexing in same file (.edb) for record data. R> I'll think about it. >> 3. add encryption with password R> The data is already slightly encrypted, R> i.e. you can't load a .edb file into an editor R> and visually read the strings or the numbers. only adding 9 if 1 byte atom still can be viewed very easily using db_dump() R> I'm not sure I want to implement one of the R> strong encryption algorithms. There are still some R> U.S. export restrictions on encryption algorithms. R> I wouldn't want Euphoria to be banned from R> distribution by the large U.S. shareware sites. Don't need to implement strong encryption. just very simple, by using sequence code. for example: data = {1,1,2,3,3,3,3,3,3,4} code = {2,3,6,5} encd = {3,4,8,8,5,6,9,8,5,7} (adding data and code)
2. Re: Re[2]: Suggestion for EDS
- Posted by Robert Craig <rds at RapidEuphoria.com> May 25, 2001
- 378 views
Aku writes: > for i=1 to 1000000 do > isi &= 254 -- large atom > end for > > x(db_insert("file",isi)) > db_close() > the database file size is 3MB > (3 bytes per atom) Yes, sorry. A character uses 3 bytes (not 2 like I said yesterday) when the value is 240 or higher, but most characters in most strings are 0 to 239, and they use only 1 byte. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re[2]: Suggestion for EDS
- Posted by aku at inbox.as May 25, 2001
- 380 views
r> Hi, Euphorians! r> I'm a bit baffled. What is EDS? Where is database.e? You can get it at http://www.rapideuphoria.com/eds.zip