7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept xml:lang="en" id="GUID-84921F68-9449-564A-8527-203FA84AF2AF"><title>Database compression</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A Store database can be compressed.</p> <p>Once compressed, a store database is read-only, but otherwise operates as normal and is opened in exactly the same way as an uncompressed database; data is dynamically decompressed as required.</p> <p>The memory required to decompress data as it is read depends on the length of the streams in the database store, but is typically just a few kilobytes. A compressed database is not noticably slower than the equivalent uncompressed database, especially on slower media, such as CF-card.</p> <p>The <codeph>RDbStoreDatabase</codeph> class provides the functions <codeph>CompressL()</codeph> and <codeph>DecompressL()</codeph> to convert a Store database to compressed form and vice-versa.</p> <p>Note that:</p> <ul><li id="GUID-0DD719CA-9073-5F03-8BB0-C71BE702E957"><p>encrypted databases cannot be compressed</p> </li> <li id="GUID-BE9AD15E-3B20-56CF-AFF4-4528457881C3"><p>index data is not compressed as the presence of indexes reduces the effective compression ratio</p> </li> <li id="GUID-D782E99C-AE1E-5158-9F5D-FD9ED94C6B29"><p>compression code on the emulator is more aggressive than that on ARM builds and can achieve better compression ratios; the resulting files are about 5% smaller at the expense of doing two or three times as much work</p> </li> <li id="GUID-7DA7C65C-C0CB-5C9E-810C-7318D7AC48EA"><p>compressing or decompressing a database can require a significant amount of memory.</p> </li> </ul> <p>When a file-store database is constructed using the <codeph>RDbNamedDatabase</codeph> interface, there is no access to the underlying store</p> </conbody></concept> |
12 <concept id="GUID-84921F68-9449-564A-8527-203FA84AF2AF" xml:lang="en"><title>Database |
|
13 compression</title><shortdesc>A Store database can be compressed and the data is dynamically |
|
14 decompressed as required. A compressed database is read-only.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <p>A <xref href="GUID-13C95985-D16F-5A9E-A7F8-CAB637C4C6ED.dita">Store database</xref> can |
|
16 be compressed.</p> |
|
17 <p>Once compressed, a Store database is read-only, but otherwise operates |
|
18 as normal and is opened in exactly the same way as an uncompressed database; |
|
19 data is dynamically decompressed as required.</p> |
|
20 <p>The memory required to decompress data as it is read, depends on the length |
|
21 of the streams in the database store, but is typically just a few kilobytes. |
|
22 A compressed database is not noticably slower than the equivalent uncompressed |
|
23 database, especially on slower media, such as CF-card.</p> |
|
24 <p>The <codeph>RDbStoreDatabase</codeph> class provides the functions <codeph>CompressL()</codeph> and <codeph>DecompressL()</codeph> to |
|
25 convert a Store database to compressed form and vice-versa.</p> |
|
26 <p>Note that:</p> |
|
27 <ul> |
|
28 <li id="GUID-0DD719CA-9073-5F03-8BB0-C71BE702E957"><p>encrypted databases |
|
29 cannot be compressed</p> </li> |
|
30 <li id="GUID-BE9AD15E-3B20-56CF-AFF4-4528457881C3"><p>index data is not compressed |
|
31 as the presence of indexes reduces the effective compression ratio</p> </li> |
|
32 <li id="GUID-D782E99C-AE1E-5158-9F5D-FD9ED94C6B29"><p>compression code on |
|
33 the emulator is more aggressive than that on ARM builds and can achieve better |
|
34 compression ratios; the resulting files are about 5% smaller at the expense |
|
35 of doing two or three times as much work</p> </li> |
|
36 <li id="GUID-7DA7C65C-C0CB-5C9E-810C-7318D7AC48EA"><p>compressing or decompressing |
|
37 a database can require a significant amount of memory.</p> </li> |
|
38 </ul> |
|
39 <p>When a file-store database is constructed using the <codeph>RDbNamedDatabase</codeph> interface, |
|
40 there is no access to the underlying store</p> |
|
41 </conbody></concept> |