Symbian3/SDK/Source/GUID-84921F68-9449-564A-8527-203FA84AF2AF.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<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>