FW: Re[2]: Suggestion for EDS

new topic     » topic index » view thread      » older message » newer message

I got the same 3meg file but, stangely enough, if you replace:
	isi &= 254 
with
	isi &= rand(255)
you got a file that is 1.1MB which is reasonably proportionate.

H. Goffin

> -----Original Message-----
> From:	aku at inbox.as [SMTP:aku at inbox.as]
> Sent:	Friday, May 25, 2001 16:20
> To:	EUforum
> Subject:	Re[2]: Suggestion for EDS
> 
> 
> 
> 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.
<snip>

>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu