Skip to content

Commit 1bcc84f

Browse files
committed
rm commented out code
1 parent 5899a29 commit 1bcc84f

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

lib/b4.ex

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,6 @@ defmodule B4 do
4040
{:keydir_fetch, :error} -> :not_found
4141
e -> e
4242
end
43-
44-
# case Keydir.fetch(tid, key) do
45-
# {:ok, {^key, file_id, entry_size, file_position, _entry_id}} ->
46-
# path = Path.join([directory, "#{file_id}.b4"])
47-
48-
# {:ok, file} = :file.open(path, [:binary, :raw, :read])
49-
50-
# {:ok,
51-
# <<
52-
# header_bytes::binary-28,
53-
# rest::binary
54-
# >>} = :file.pread(file, file_position, entry_size)
55-
56-
# <<disk_crc32::integer-big-32, rest_of_header_bytes::binary-24>> =
57-
# header_bytes
58-
59-
# <<_id::integer-big-128, key_size::integer-big-32, value_size::integer-big-32>> =
60-
# rest_of_header_bytes
61-
62-
# <<key_bytes::bytes-size(key_size), value_bytes::bytes-size(value_size)>> = rest
63-
64-
# challenge_crc32 =
65-
# :erlang.crc32([rest_of_header_bytes, key_bytes, value_bytes])
66-
67-
# ^disk_crc32 = challenge_crc32
68-
69-
# {:ok, :erlang.binary_to_term(value_bytes)}
70-
71-
# :error ->
72-
# :error
73-
# end
7443
end
7544

7645
def delete(directory, key) do

0 commit comments

Comments
 (0)