Skip to content
Permalink
Browse files

StrTrie - use raw Stream.Read instead of StreamReader

  • Loading branch information...
bobbymcr committed Apr 4, 2019
1 parent 8c8255f commit 81b48fe5968cefe9a8bad09e9d39af3ccd925952
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Words.Core/StrTrie.cs
@@ -28,19 +28,19 @@ public enum NodeKind : byte

public static StrTrie Load(Stream stream)
{
using (StreamReader reader = new StreamReader(stream))
using (stream)
{
StrTrie trie = new StrTrie();
char[] buffer = new char[1024];
byte[] buffer = new byte[1024];
Str value = default(Str);
bool skip = false;
int length;
do
{
length = reader.ReadBlock(buffer, 0, buffer.Length);
length = stream.Read(buffer, 0, buffer.Length);
for (int i = 0; i < length; ++i)
{
char c = buffer[i];
char c = (char)buffer[i];
switch (c)
{
case '\r':

0 comments on commit 81b48fe

Please sign in to comment.
You can’t perform that action at this time.