in src/append.jl [256:278]
function stream_properties(io::IO; convert::Bool=true)
startpos = position(io)
buff = similar(FILE_FORMAT_MAGIC_BYTES)
start_magic = read!(io, buff) == FILE_FORMAT_MAGIC_BYTES
seekend(io)
len = position(io) - startpos
skip(io, -length(FILE_FORMAT_MAGIC_BYTES))
end_magic = read!(io, buff) == FILE_FORMAT_MAGIC_BYTES
seek(io, startpos)
isstream = !(len > 24 && start_magic && end_magic)
if isstream
stream = Stream(io, convert=convert)
for table in stream
(stream.compression[] !== nothing) && break
end
seek(io, startpos)
return isstream, Tables.Schema(stream.names, stream.types), stream.compression[]
else
return isstream, nothing, nothing
end
end