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 enco

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 how

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; whe

Re: [Flashcoders] Simple compression algo?

2008-02-04 Thread Dave Mennenoh
you're sending a comma separated string to the server? why not have 2 hey digits for all the data and omit the comma? this would bring your data to 2/3 of its size, which means 26sec*2/3 = 17.3sec when this works, you could try to send binary data - so instead if sending the string "ff" you woul

Re: [Flashcoders] Simple compression algo?

2008-02-04 Thread Dave Mennenoh
if you can't create binary data, you could still use base64 encoding instead, which would give you 8.6*1.33 = 11.5sec. OK, I did some tests and it's taking way too long to base64 encode the string. It might be quicker to send once it's done, but overall it'd be a lot slower than my current met

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 http://www.adobe.com/communities/e

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 arr

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 Juan Pablo Califano
" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Sunday, February 03, 2008 8:12 PM Subject: [Flashcoders] Simple compression algo? 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,

[Flashcoders] Simple compression algo?

2008-02-03 Thread Dave Mennenoh
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. Then, make a new a