Re: [Flashcoders] Simple compression algo?

2008-02-05 Thread Dave Mennenoh
Hi Juan - I don't think it's assigning the string that's slow. It's calling sendAndLoad that is slow, because I think when you make the call the data is urlencoded or something. I've already found that, and am not calling it. I was simply outputting the before and after string lengths to see

Re: [Flashcoders] Simple compression algo?

2008-02-05 Thread Juan Pablo Califano
I don't think it's assigning the string that's slow. It's calling sendAndLoad that is slow, because I think when you make the call the data is urlencoded or something Yes, you're probably right. I thought maybe the string was encoded as soon as it assigned, but it makes more sense that the

Re: [Flashcoders] Simple compression algo?

2008-02-04 Thread Dave Mennenoh
Sounds a bit like Run Length Encoding Right, I mentioned that. :) I kept it simple to be able to reconstruct the image from it more easily in PHP. Gotta try the base64 thing next. Dave - Head Developer http://www.blurredistinction.com Adobe Community Expert

Re: [Flashcoders] Simple compression algo?

2008-02-04 Thread Juan Pablo Califano
Actually, from my tests (on the component I made, which was AS 3.0), the bottle neck was not encoding to base 64 per se (as I assumed at first), but assigning the resulting string to the LoadVars object (o URLRequest in my case...). If I commented out that specific line, it worked way faster; when

Re: [Flashcoders] Simple compression algo?

2008-02-03 Thread Juan Pablo Califano
Interesting stuff. I assume you're creating the jpeg on the server since you seem to be passing the raw bitmap data (compressing the pixel data with your algorythm). Perhaps another approach worth trying is creating the jpef directly on the Flash app. Have you tried it? I've done that with

Re: [Flashcoders] Simple compression algo?

2008-02-03 Thread Glen Pike
Sounds a bit like Run Length Encoding Dave Mennenoh wrote: Hi all, I've been working on allowing users to dowload a jpeg from a movieClip in AS2 and came up with a simple, yet novel compression idea, that's a bit like RLE but not quite. Basically it is this - analyze the image pixel by pixel

RE: [Flashcoders] Simple compression algo?

2008-02-03 Thread Claudius Ceteras
Hi, Hi all, I've been working on allowing users to dowload a jpeg from a movieClip in AS2 and came up with a simple, yet novel compression idea, that's a bit like RLE but not quite. Basically it is this - analyze the image pixel by pixel to get the hex color codes into an array.