Skip to content

Commit

Permalink
Remove direct TranscodingStreams dep (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 authored Jul 4, 2024
1 parent 0637e56 commit 3e9c517
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@ version = "0.5.1"
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"

[compat]
CodecZlib = "0.7"
TranscodingStreams = "0.9, 0.10"
julia = "1"
Downloads = "^1"
GZip = "0.5, 0.6"
LinearAlgebra = "^1"
SHA = "0.7, 1"
SparseArrays = "^1"
Downloads = "^1"
Test = "^1"
SHA = "0.7, 1"
GZip = "0.5, 0.6"
julia = "1"

[extras]
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Expand Down
2 changes: 1 addition & 1 deletion src/MatrixMarket.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module MatrixMarket
using SparseArrays
using LinearAlgebra

using TranscodingStreams, CodecZlib
using CodecZlib

export mmread, mmwrite, mminfo

Expand Down
2 changes: 1 addition & 1 deletion src/mminfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function mminfo(filename::String)
stream = open(filename, "r")

if endswith(filename, ".gz")
stream = TranscodingStream(GzipDecompressor(), stream)
stream = GzipDecompressorStream(stream)
end

info = mminfo(stream)
Expand Down
2 changes: 1 addition & 1 deletion src/mmread.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function mmread(filename::String, infoonly::Bool=false, retcoord::Bool=false)
stream = open(filename, "r")

if endswith(filename, ".gz")
stream = TranscodingStream(GzipDecompressor(), stream)
stream = GzipDecompressorStream(stream)
end

result = infoonly ? mminfo(stream) : mmread(stream, retcoord)
Expand Down
2 changes: 1 addition & 1 deletion src/mmwrite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function mmwrite(filename::String, matrix::SparseMatrixCSC)
stream = open(filename, "w")

if endswith(filename, ".gz")
stream = TranscodingStream(GzipCompressor(), stream)
stream = GzipCompressorStream(stream)
end

mmwrite(stream, matrix)
Expand Down

0 comments on commit 3e9c517

Please sign in to comment.