I noticed that _end is never used. I also noticed that bytes is not used, but it is incremented here which could be a bug? Similarly here with fields.
_end
bytes
fields