From: "Mauricio Fernández" Date: 2003-05-06T06:04:18+09:00 Subject: Re: [Q] Binary data On Tue, May 06, 2003 at 05:17:01AM +0900, Daniel Carrera wrote: > Hi, > > Is it possible to store and manipulate binary data in Ruby? > As in the actual sequence of 1's and 0's. I'm curious in the > data-compression problem, but to be able to do any compression on a Ruby > string I need to be able to manipulate data at the bit level. > > Does anyone know how this can be done? I can think of the following: Bit operations w/ Fixnum, then Array#pack. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com * LG loves czech girls. LG: do they have additional interesting "features" other girls don't have? ;) -- #Debian