Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ _nbytes
Function
_nbytes
Lib/compression/zstd/_zstdfile.py:13–17 ·
view source on GitHub ↗
(dat, /)
Source
from the content-addressed store, hash-verified
11
12
13
def
_nbytes(dat, /):
14
if
isinstance(dat, (bytes, bytearray)):
15
return
len(dat)
16
with
memoryview(dat)
as
mv:
17
return
mv.nbytes
18
19
20
class
ZstdFile(_streams.BaseStream):
Callers
4
train_dict
Function · 0.90
finalize_dict
Function · 0.90
test_train_buffer_protocol_samples
Method · 0.85
write
Method · 0.85
Calls
no outgoing calls
Tested by
1
test_train_buffer_protocol_samples
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…