[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Can LPeg parse PNG?
- From: "Soni L." <fakedme@...>
- Date: Sat, 10 Dec 2016 09:18:03 -0200
On 10/12/16 12:12 AM, KHMan wrote:
On 12/10/2016 9:46 AM, Duncan Cross wrote:
On Sat, Dec 10, 2016 at 12:10 AM, Soni L. wrote:
I was told PNG is a regular language, in the sense that you can
PNG chunk with a VERY VERY VERY LONG regex.
Including the 32-bit CRC at the end of the chunk? That's got to be a
hell of a regex.
I'm really curious about the "I was told PNG is a regular language"
though. It directs the blame for the idea on an anonymous someone else.
Perhaps he has VERY VERY VERY LARGE amounts of free time this weekend,
or perhaps he wants to trap some unsuspecting folks trying it. I think
Each PNG chunk is a finite sequence of bytes. Thus, a long enough regex
can parse a stream of PNG chunks.
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.