<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Mh, actually I was not talking about Forms but about sound samples ...</p>
<div id="x_Signature">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Beginners <beginners-bounces@lists.squeakfoundation.org> im Auftrag von Yoshiki Ohshima <Yoshiki.Ohshima@acm.org><br>
<b>Gesendet:</b> Dienstag, 1. Oktober 2019 16:04:06<br>
<b>An:</b> A friendly place to get answers to even the most basic questions about Squeak.<br>
<b>Betreff:</b> Re: [Newbies] Compressing large arrays</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">The thing to use is the hackBits: method of Form class.  It is a bit<br>
tricky to use, but some examples can be found here:<br>
<br>
<a href="http://forum.world.st/Get-raw-24-Bit-image-data-into-a-Form-td4846845.html">http://forum.world.st/Get-raw-24-Bit-image-data-into-a-Form-td4846845.html</a><br>
<br>
basically the BitBlt mechanism can take byte objects as well as word<br>
objects and "render" one kind onto another.<br>
<br>
On Tue, Oct 1, 2019 at 3:14 AM Thiede, Christoph<br>
<Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br>
><br>
> Thank you for your reply. I already thought about bit manipulation, but actually, I was searching for an existing interface for this purpose. So there is no one (yet)?<br>
><br>
> ________________________________<br>
> Von: Beginners <beginners-bounces@lists.squeakfoundation.org> im Auftrag von Yoshiki Ohshima <Yoshiki.Ohshima@acm.org><br>
> Gesendet: Montag, 30. September 2019 20:30:37<br>
> An: A friendly place to get answers to even the most basic questions about Squeak.<br>
> Betreff: Re: [Newbies] Compressing large arrays<br>
><br>
> For values in that range, you can store them in a typed array called<br>
> ShortIntegerArray. (not 6 or 8 bytes but 2 bytes per value). Then,<br>
> there are some bit manipulation magic to get bytes and simply store<br>
> them into a file for example.<br>
><br>
> On Mon, Sep 30, 2019 at 9:31 AM Thiede, Christoph<br>
> <Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> ><br>
> > today I learned that I can use #byte64Encoded to compress ByteArrays (and #mimeDecodeToBytes: to uncompress it again).<br>
> ><br>
> > However, I wonder whether there is an option to do the same for arrays that elements' are not limited to bytes. Concretely, I have got an array of integers in range (-20601 to: 20935), so I can map it to 6 or 8 bytes per value. Does Squeak support any way
 to compress such an array to a stream?<br>
> ><br>
> ><br>
> > Best,<br>
> ><br>
> > Christoph<br>
> ><br>
> > _______________________________________________<br>
> > Beginners mailing list<br>
> > Beginners@lists.squeakfoundation.org<br>
> > <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
><br>
><br>
><br>
> --<br>
> -- Yoshiki<br>
> _______________________________________________<br>
> Beginners mailing list<br>
> Beginners@lists.squeakfoundation.org<br>
> <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
> _______________________________________________<br>
> Beginners mailing list<br>
> Beginners@lists.squeakfoundation.org<br>
> <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
<br>
<br>
<br>
-- <br>
-- Yoshiki<br>
_______________________________________________<br>
Beginners mailing list<br>
Beginners@lists.squeakfoundation.org<br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div>
</span></font>
</body>
</html>