[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Reading and writing mp3 metadata
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 30 Apr 2013 10:49:08 -0300
> On Tue, Apr 30, 2013 at 12:51 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
> > f = io.open("foo.mp3","rb")
> > h = f:read(128)
> > f:close()
>
> Isn't h the first 128 bytes in this instance rather than the last 128 bytes?
Oops, I missed that. You need to seek before reading:
f:seek("end",-128)
h = f:read(128)