Data::Section::Seekable - Read and write parts from data section
This document describes version 0.09 of Data::Section::Seekable (from Perl distribution Data-Section-Seekable), released on 2016-02-19.
This module defines a simple format to let you store and read parts from data section. The distribution also comes with a reader (see Data::Section::Seekable::Reader) and a writer/generator (see Data::Section::Seekable::Writer).
Like Data::Section, the format allows you to store multiple parts in data section. This module's format is different from Data::Section's and is meant to allow seeking to any random content part just by reading the index/"table of content" part of the data section.
This document descries version 1 (v1) of the format.
First line of data section is the header line and must be:
Actually, the header line need not be the first line of data. Previous lines not matching the header line will be ignored (so you can put other stuffs here).
After the header line, comes zero or more TOC ("table of content") lines. Each TOC line must match this Perl regex:
/^([^,]+), (\d+), (\d+) (?:, (.*))?/x
The first field is the name, the second field is the offset, the third field is the length. Offset starts from 0 and the zero is counted from after the blank line after the last TOC line. The fourth field is to store extra information, it is optional and can contain zero or more non-newline characters.
After the last TOC line is a blank line. And after that is content.
Data::Section::Seekable v1 part1,0,14 part2,14,17,very,important This is part1 This is part two
Please visit the project's homepage at https://metacpan.org/release/Data-Section-Seekable.
Source repository is at https://github.com/perlancar/perl-Data-Section-Seekable.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Section-Seekable
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2016 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.