| 909 | } |
| 910 | |
| 911 | void substr_of(const list& bl, unsigned off, unsigned len) { |
| 912 | for (const auto& bptr : bl.buffers()) { |
| 913 | if (off >= bptr.length()) { |
| 914 | off -= bptr.length(); |
| 915 | continue; |
| 916 | } |
| 917 | const auto round_size = std::min(bptr.length() - off, len); |
| 918 | append(bptr.c_str() + off, round_size); |
| 919 | len -= round_size; |
| 920 | off = 0; |
| 921 | } |
| 922 | } |
| 923 | }; |
| 924 | |
| 925 | page_aligned_appender get_page_aligned_appender(unsigned min_pages=1) { |