Re: dir/file plus more (was: Re: Are svn_fs_dir_t and svn_fs_file_t worth it?)
From: Jim Blandy <jimb_at_zwingli.cygnus.com>
Date: 2000-11-09 04:25:15 CET
> *) svn_fs__file_from_skel() appears to copy the file contents into memory.
Berkeley DB does have mechanisms for reading and writing partial
Berkeley DB Reference Guide: [Prev] [Ref][Next]
Partial record storage and retrieval
It is possible to both store and retrieve parts of data items in all
The DB_DBT_PARTIAL flag is based on the values of two elements of the DBT
For example, if the data item were ABCDEFGHIJKL, a doff value of 3 would
When retrieving a data item from a database, the dlen bytes starting doff
When storing a data item into the database, the dlen bytes starting doff
The following are various examples of the put case for the DB_DBT_PARTIAL
ABCDEFGHIJ0123456789
1. size = 20
Result: The 20 bytes at offset 0 are replaced by the 20 bytes of data,
ABCDEFGHIJ0123456789 -> abcdefghijabcdefghij
2. size = 10
Result: The 0 bytes at offset 20 are replaced by the 10 bytes of data,
ABCDEFGHIJ0123456789 -> ABCDEFGHIJ0123456789abcdefghij
3. size = 10
Result: The 5 bytes at offset 10 are replaced by the 10 bytes of data.
ABCDEFGHIJ0123456789 -> ABCDEFGHIJabcdefghij56789
4. size = 10
Result: The 0 bytes at offset 10 are replaced by the 10 bytes of data,
ABCDEFGHIJ0123456789 -> ABCDEFGHIJabcdefghij0123456789
5. size = 10
Result: The 15 bytes at offset 2 are replaced by the 10 bytes of data.
ABCDEFGHIJ0123456789 -> ABabcdefghij789
6. size = 10
Result: The 0 bytes at offset 0 are replaced by the 10 bytes of data,
ABCDEFGHIJ0123456789 -> abcdefghijABCDEFGHIJ0123456789
7. size = 0
Result: The 10 bytes at offset 0 are replaced by the 0 bytes of data,
ABCDEFGHIJ0123456789 -> 0123456789
8. size = 10
Result: The 0 bytes at offset 25 are replaced by the 10 bytes of data,
ABCDEFGHIJ0123456789 -> ABCDEFGHIJ0123456789\0\0\0\0\0abcdefghij
[Prev] [Ref][Next]
Copyright Sleepycat Software
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.