This file is indexed.

/usr/share/mozart/doc/system/node57.html is in mozart-doc 1.4.0-8ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
2
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>22 Persistent Values: Pickle</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="index.html">- Up -</A></TD><TD><A href="node58.html#chapter.property">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="chapter.pickle"><H1><A name="chapter.pickle">22 Persistent Values: <CODE>Pickle</CODE></A></H1><P> The <CODE>Pickle</CODE> module provides procedures to store and retrieve stateless values on persistent storage. </P><P></P><DL><DT><CODE>save</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>save&nbsp;</CODE><CODE>+<I>X</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>PathV</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label818"></A> Stores <CODE><I>X</I></CODE> in a file named <CODE><I>PathV</I></CODE>.</P><P>Note that <CODE><I>X</I></CODE> can be any <EM>stateless</EM> value. So it is possible to save for example records, procedures or classes. However an exception is raised if for example <CODE><I>X</I></CODE> contains an object or a logic variable. </P></DD><DT><CODE>saveCompressed</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>saveCompressed&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>PathV</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>LevelI</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label820"></A> Works like <CODE>save</CODE> but additionally compresses its output. <CODE><I>LevelI</I></CODE> is an integer between <CODE>0</CODE> and <CODE>9</CODE> specifying the compression level: the higher the value the better the compression factor, but the longer compression takes. A value of <CODE>0</CODE> gives no compression, so <CODE>{Pickle<SPAN class="keyword">.</SPAN>save&nbsp;X&nbsp;Value}</CODE> is equivalent to <CODE>{Pickle<SPAN class="keyword">.</SPAN>saveCompressed&nbsp;X&nbsp;Value&nbsp;0}</CODE>. </P><P>Compression time and ratio depend on the type of input. The compression ratio might vary between 20 and 80 percent, while compression at level 9 is usually less than 2 times slower than using no compression. </P></DD><DT><CODE>saveWithHeader</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>saveWithHeader&nbsp;</CODE><CODE><I>X</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>PathV</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>HeaderV</I></CODE><CODE>&nbsp;</CODE><CODE>+<I>LevelI</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label822"></A> This procedure is a generalization of the above builtins. It saves <CODE><I>X</I></CODE> in file <CODE>+<I>PathV</I></CODE> with compression level <CODE>+<I>LevelI</I></CODE> and additionally prepends the virtual string <CODE><I>HeaderV</I></CODE> at the beginning. So <CODE><I>HeaderV</I></CODE> can be used for example to prepend a comment in front of the pickle or to prepend a shell startup script to load and execute the pickle. </P></DD><DT><CODE>loadWithHeader</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>loadWithHeader&nbsp;</CODE><CODE>+<I>UrlV</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>Pair</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label824"></A></P><P>This procedure retrieves a value from URL <CODE><I>UrlV</I></CODE> that has been previously saved with one of the above procedures. It returns a pair <CODE><I>HeaderV</I></CODE><CODE><SPAN class="keyword">#</SPAN></CODE><CODE><I>Value</I></CODE>, where <CODE><I>HeaderV</I></CODE> is the (possibly empty) header and <CODE><I>Value</I></CODE> the value that was retrieved. </P></DD><DT><CODE>load</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>load&nbsp;</CODE><CODE>+<I>UrlV</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>Value</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label826"></A></P><P>This is just a shortcut for </P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>loadWithHeader&nbsp;</CODE><CODE><I>UrlV</I></CODE><CODE>&nbsp;_<SPAN class="keyword">#</SPAN></CODE><CODE><I>Value</I></CODE><CODE>}</CODE></BLOCKQUOTE><P> </P></DD><DT><CODE>pack</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>pack&nbsp;</CODE><CODE>+<I>X</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>ByteString</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label828"></A></P><P>Takes a value <CODE><I>X</I></CODE> and pickles it to a bytestring. </P></DD><DT><CODE>unpack</CODE> </DT><DD><BLOCKQUOTE class="synopsis"><P></P><BLOCKQUOTE class="code"><CODE>{Pickle<SPAN class="keyword">.</SPAN>unpack&nbsp;</CODE><CODE>+<I>PickleV</I></CODE><CODE>&nbsp;</CODE><CODE>?<I>Value</I></CODE><CODE>}</CODE></BLOCKQUOTE><P></P></BLOCKQUOTE></DD><DD><P><A name="label830"></A></P><P>Unpacks a virtual string <CODE><I>PickleV</I></CODE> that has created by pickling (e.g., by <CODE>Pickle<SPAN class="keyword">.</SPAN>pack</CODE>).</P><DIV class="danger"><P class="margin"><IMG align="top" alt="Danger" src="danger.gif"></P><P><CODE>Pickle<SPAN class="keyword">.</SPAN>unpack</CODE> may crash the Oz Engine if given a corrupt pickle.</P></DIV></DD></DL><P> </P></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="index.html">- Up -</A></TD><TD><A href="node58.html#chapter.property">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~duchier/">Denys&nbsp;Duchier</A>, <A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A>, <A href="http://www.ps.uni-sb.de/~homik/">Martin&nbsp;Homik</A>, <A href="http://www.ps.uni-sb.de/~tmueller/">Tobias&nbsp;Müller</A>, <A href="http://www.ps.uni-sb.de/~schulte/">Christian&nbsp;Schulte</A> and&nbsp;<A href="http://www.info.ucl.ac.be/~pvr">Peter&nbsp;Van Roy</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>