This is the documentation page for Module:CSV
cerial. lua
Copyright 2018 wesley werner <wesley.werner@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Serialize a Lua table into a CSV-like string. Handles standard types and circular table references. Does not serialize user data, functions or up-values.
Usage:
- local cerial = require("Module:CSV")
- local cerialstring = cerial.encode(table)
- local reconstructed = cerial.decode(cerialstring)
Performance vs pickle over 10000 encodes
- cerial:
- serialized to 365 bytes
- real 0m0.854s
- user 0m0.852s
- sys 0m0.000s
- pickle:
- serialized to 463 bytes
- real 0m0.740s
- user 0m0.740s
- sys 0m0.004s
Modified from original: https://gist.github.com/wesleywerner/3f1e3a64079d81511084925c465eb34d
Usage
Module
local csv = require('Module:CSV')
Documentation
- Created with Docbunto
See Also