equal
deleted
inserted
replaced
|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
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> |