[Qt-interest] How to compress QString
Ankit Agarwal
ankit17.ag at gmail.com
Thu Apr 16 12:03:12 CEST 2009
Hi,
Whats the advantage that we get by converting the string to UTF - 8?
On Thu, Apr 16, 2009 at 3:29 PM, Thiago Macieira <
thiago.macieira at trolltech.com> wrote:
> Em Quinta-feira 16 Abril 2009, às 11:08:47, Oliver.Knoll at comit.chescreveu:
> > One flavour of qCompress takes an uchar * and the number of bytes as
> > argument:
> >
> > QByteArray qCompress (const uchar *data, int nbytes, int
> compressionLevel
> > = -1)
> >
> > You get access to the raw unicode bytes within a QString with several
> > methods:
> >
> > http://doc.trolltech.com/4.5/qstring.html#data-2 (you get a QChar *)
> > http://doc.trolltech.com/4.5/qstring.html#utf16 (you get a ushort *)
> > http://doc.trolltech.com/4.5/qstring.html#unicode (you get a QChar *)
>
> I would instead recommend you convert the string to UTF-8 before you
> compress
> it.
>
> YMMV.
> --
> Thiago Macieira - thiago.macieira (AT) nokia.com
> Senior Product Manager - Nokia, Qt Software
> Sandakerveien 116, NO-0402 Oslo, Norway
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
--
Regards,
Ankit Agarwal
SW Engineer
Vegayan Systems
email : ankit_agarwal at vegayan.com
Blog : http://ankit17.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090416/7afdc9a5/attachment.html
More information about the Qt-interest-old
mailing list