From: <nik...@al...> - 2002-11-21 11:05:46
|
Bon, désolé de vous faire chier avec ce sujet pourrav', mais je viens de réaliser que j'ai dit des conneries, visiblement la seule façon de mettre des bit dans un stream, c de les regrouper par paquets de 8 dans des unsigned char (c'est bien ce que tu faisais, Sanx ?) ... La question, c juste : comment intercaller des int dans ce flot ? Est-ce une bonne idée de les faire passer "bit par bit", où faut-il faire du padding pour boucler le dernier char transmis ? Gabriel ----- Original Message ----- From: "Gabriel Peyré" <nik...@al...> To: <ori...@li...> Sent: Wednesday, November 20, 2002 4:07 PM Subject: Re: [Orion3d-dev] bit buffer > En fait, j'ai juste besoin de mettre des bits les uns à la suite des autres > (c pour implémenter un compresseur > "embeded", cad on peut arréter le flot de bits quand on veut, ça donne une > image de plus en plus précise), et qq > fois d'intercaller des int. > Donc je pensais juste utiliser les bitset de la stl qui ont l'air de se > sérializer direct dans des outputstream. Je sais pas > si il y a un truc particulier à faire pour le padding (a la fin de la > transmition ...). > Sinon, il semble que les vector<bool> permettent de manager des champs de > bits dynamiques. > > Gabriel > > ----- Original Message ----- > From: "Laurent Mascherpa" <lau...@fx...> > To: <ori...@li...> > Sent: Wednesday, November 20, 2002 3:19 PM > Subject: Re: [Orion3d-dev] bit buffer > > > > > Est-ce que qq'un sait s'il existe un implémentation plus ou moins standard > de bitbuffer > > (mettre une suite de bit dans un stream, par exemple un fichier), avec des > fonctions pratiques > > pour pouvoir mettre aussi des type diverses et variés (int, float). > > > > ok, c sans doute pas très dur à coder, juste c domage de réinventer la > roue ... > > Sinon, si vous avez des conseils d'implémentation/optimisation (entre > autre pour utiliser les stream STL). > > Désolé j'ai rien de ca, ca m'étonne que ca soit pas dans une lib genre > Boost. > > Néanmoins, j'en ai codé un à il y a 2 ans, pour un décodeur de SWF > (format shockwave). Et bon c'est pas très dur, mais c'est assez lent; > c'est interessant de voir les règles qu'ils ont au niveau du padding. > Mais bon, c'est pas le sujet ;) > > Laurent, > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > Orion3d-dev mailing list > Ori...@li... > https://lists.sourceforge.net/lists/listinfo/orion3d-dev > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > Orion3d-dev mailing list > Ori...@li... > https://lists.sourceforge.net/lists/listinfo/orion3d-dev |