We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe16d8b commit 7283c3aCopy full SHA for 7283c3a
src/Indexes.jl
@@ -14,6 +14,18 @@ import BGZFStreams
14
import BioGenerics
15
import GenomicFeatures: Interval
16
17
+function Base.bytesavailable(stream::BGZFStreams.BGZFStream{IOStream})
18
+
19
+ block_index = BGZFStreams.ensure_buffered_data(stream)
20
+ if block_index == 0
21
+ return 0
22
+ end
23
+ block = stream.blocks[block_index]
24
25
+ return length(block.position:block.size)
26
27
+end
28
29
include("chunk.jl")
30
include("bgzfindex.jl")
31
include("tabix.jl")
0 commit comments