binpickle
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: binpickle | ||
| Version: 0.3.0 | ||
| Version: 0.3.1 | ||
| Summary: Efficient binary storage of ML models | ||
@@ -9,2 +9,3 @@ Home-page: https://binpickle.lenskit.org | ||
| License: MIT License | ||
| Project-URL: GitHub, https://github.com/lenskit/binpickle | ||
| Description: # BinPickle - efficient binary pickled data | ||
@@ -11,0 +12,0 @@ |
@@ -5,5 +5,5 @@ """ | ||
| __version__ = '0.3.0' | ||
| __version__ = '0.3.1' | ||
| from .write import dump, BinPickler # noqa: F401 | ||
| from .read import load, BinPickleFile # noqa: F401 |
@@ -13,2 +13,4 @@ import logging | ||
| def _split_blocks(buf, blocksize): | ||
| if buf.itemsize > 1: | ||
| buf = buf.cast('B') | ||
| length = buf.nbytes | ||
@@ -49,7 +51,9 @@ chunks = [] | ||
| mv = memoryview(buf) | ||
| _log.debug('encoding %d bytes (itemsize=%d, format=%s)', | ||
| mv.nbytes, mv.itemsize, mv.format) | ||
| _log.debug('splitting with block size %d', self.blocksize) | ||
| blocks = _split_blocks(mv, self.blocksize) | ||
| _log.debug('compressing %d bytes in %d blocks (itemsize=%d)', | ||
| mv.nbytes, len(blocks), mv.itemsize) | ||
| out.write(pack.pack_array_header(len(blocks))) | ||
| for block in blocks: | ||
| assert block.nbytes <= self.blocksize | ||
| comp = blosc.compress(block, cname=self.name, clevel=self.level, | ||
@@ -56,0 +60,0 @@ shuffle=self.shuffle, typesize=mv.itemsize) |
+2
-1
| Metadata-Version: 2.1 | ||
| Name: binpickle | ||
| Version: 0.3.0 | ||
| Version: 0.3.1 | ||
| Summary: Efficient binary storage of ML models | ||
@@ -9,2 +9,3 @@ Home-page: https://binpickle.lenskit.org | ||
| License: MIT License | ||
| Project-URL: GitHub, https://github.com/lenskit/binpickle | ||
| Description: # BinPickle - efficient binary pickled data | ||
@@ -11,0 +12,0 @@ |
+2
-0
| [metadata] | ||
| name = binpickle | ||
| url = https://binpickle.lenskit.org | ||
| project_urls = | ||
| GitHub=https://github.com/lenskit/binpickle | ||
| author = Michael Ekstrand | ||
@@ -5,0 +7,0 @@ author_email = michaelekstrand@boisestate.edu |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
34084
1.01%690
0.58%