MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / init_Compression

Function init_Compression

python/PyCompression.cpp:12–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace PyMesh;
11
12void init_Compression(py::module& m) {
13 py::class_<CompressionEngine, std::shared_ptr<CompressionEngine> >(m, "CompressionEngine")
14 .def_static("create", &CompressionEngine::create)
15 .def("compress",
16 [](const std::shared_ptr<CompressionEngine> engine, PyMesh::Mesh::Ptr mesh) {
17 const auto data = engine->compress(mesh);
18 return py::bytes(data);
19 })
20 .def("decompress", &CompressionEngine::decompress);
21}

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls 1

compressMethod · 0.45

Tested by

no test coverage detected