Hacker News new | ask | show | jobs
by jgalar 2096 days ago
I would guess memory map the whole file, then do the equivalent of:

memmove(beginning_of_file, beginning_of_file + 300_m_line_offset, file_size - 300_m_line_offset);