File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1522,6 +1522,14 @@ class document::parser {
15221522 //
15231523 size_t _max_depth;
15241524
1525+ //
1526+ // The loaded buffer (reused each time load() is called)
1527+ //
1528+ std::unique_ptr<char [], decltype (&aligned_free_char)> loaded_bytes;
1529+
1530+ // Capacity of loaded_bytes buffer.
1531+ size_t _loaded_bytes_capacity{0 };
1532+
15251533 // all nodes are stored on the doc.tape using a 64-bit word.
15261534 //
15271535 // strings, double and ints are stored as
@@ -1543,6 +1551,11 @@ class document::parser {
15431551 // and auto-allocate if not.
15441552 inline error_code ensure_capacity (size_t desired_capacity) noexcept ;
15451553
1554+ //
1555+ // Read the file into loaded_bytes
1556+ //
1557+ inline simdjson_result<size_t > read_file (const std::string &path) noexcept ;
1558+
15461559#if SIMDJSON_EXCEPTIONS
15471560 // Used internally to get the document
15481561 inline const document &get_document () const noexcept (false );
You can’t perform that action at this time.
0 commit comments