Re: Manipulating binary data
- From: Chung Leong <chernyshevsky@xxxxxxxxxxx>
- Date: 30 Apr 2007 02:10:08 -0700
On Apr 29, 6:36 pm, brainflakes....@xxxxxxxxxxxxxx wrote:
Hi guys,
I need to manipulate binary data (8 bit) stored in a 2 dimensional
array.
I've tried various methods (arrays, using a string filled with chr(0),
using gd lib) and so far the fastest way I've found is to actually
create an 8-bit image in GD and use imagecolorat and imagesetpixel to
read and write the data.
Are there actually any proper binary extensions or is using gd lib the
way to go (as I guess it's just dealing with binary data as a 2d array
anyway)
Andrew
I doubt that's the optimal solution. Function calls are relatively
expensive in PHP. The difference in speed you observed between the
different methods can probably be attributed to the number of calls
made per element.
Explain exactly what you're trying to do. There probably is a better
approach.
.
- Follow-Ups:
- Re: Manipulating binary data
- From: brainflakes . org
- Re: Manipulating binary data
- References:
- Manipulating binary data
- From: brainflakes . org
- Manipulating binary data
- Prev by Date: Re: Delete temporary images after loading website
- Next by Date: Re: Delete temporary images after loading website
- Previous by thread: Re: Manipulating binary data
- Next by thread: Re: Manipulating binary data
- Index(es):
Relevant Pages
|