Skip to content

Commit 1f49adf

Browse files
Remove check for zero size in block compress (python#27)
There are valid use cases for passing a zero length string to compress: python-lz4/python-lz4#27
1 parent 6b548e8 commit 1f49adf

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lz4/block/_block.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ compress (PyObject * Py_UNUSED (self), PyObject * args, PyObject * kwargs)
121121
return NULL;
122122
}
123123

124-
if (source_size <= 0) {
125-
PyErr_Format(PyExc_ValueError, "Input source data size invalid: %d bytes", source_size);
126-
return NULL;
127-
}
128-
129124
if (!strncmp (mode, "default", sizeof ("default")))
130125
{
131126
comp = DEFAULT;

0 commit comments

Comments
 (0)