diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py
index 4329c4c1b263de4c6275e5b2d65574d0d38f446b_cHlhc24xL2NvZGVjL2Jlci9kZWNvZGVyLnB5..13067380249e7885f5b64787c046d63aba78b0cc_cHlhc24xL2NvZGVjL2Jlci9kZWNvZGVyLnB5 100644
--- a/pyasn1/codec/ber/decoder.py
+++ b/pyasn1/codec/ber/decoder.py
@@ -120,7 +120,7 @@
         raise UnsupportedSubstrateError("Cannot convert " + substrate.__class__.__name__ + " to a seekable bit stream.")
 
 
-def endOfStream(substrate):
+def _endOfStream(substrate):
     """Check whether we have reached the end of a stream.
 
     Although it is more effective to read and catch exceptions, this
@@ -145,7 +145,7 @@
         return not substrate.peek(1)
 
 
-def peek(substrate, size=-1):
+def _peek(substrate, size=-1):
     """Peek the stream.
 
     Parameters
@@ -297,7 +297,7 @@
             return substrateFun(self._createComponent(
                 asn1Spec, tagSet, noValue, **options), substrate, length)
 
-        if not length or endOfStream(substrate):
+        if not length or _endOfStream(substrate):
             raise error.PyAsn1Error('Empty BIT STRING substrate')
 
         if tagSet[0].tagFormat == tag.tagFormatSimple:  # XXX what tag to check?
@@ -1226,7 +1226,7 @@
             length += (currentPosition - fullPosition)
 
             if LOG:
-                LOG('decoding as untagged ANY, substrate %s' % debug.hexdump(peek(substrate, length)))
+                LOG('decoding as untagged ANY, substrate %s' % debug.hexdump(_peek(substrate, length)))
 
         if substrateFun:
             return substrateFun(self._createComponent(asn1Spec, tagSet, noValue, **options),