mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
use the word 'codec' for erasure coding, for now. 'encode' is used for file-level segmentation/hashing
This commit is contained in:
parent
a65608fec1
commit
417c17755b
@ -6,7 +6,7 @@ from twisted.internet import defer
|
||||
from twisted.application import service
|
||||
|
||||
from allmydata.util import idlib
|
||||
from allmydata import encode
|
||||
from allmydata import codec
|
||||
|
||||
class NotEnoughPeersError(Exception):
|
||||
pass
|
||||
@ -34,8 +34,8 @@ class FileDownloader:
|
||||
n = self._shares = 4
|
||||
k = self._desired_shares = 2
|
||||
self._target.open()
|
||||
self._decoder = encode.Decoder(self._target, k, n,
|
||||
self._verifierid)
|
||||
self._decoder = codec.Decoder(self._target, k, n,
|
||||
self._verifierid)
|
||||
|
||||
def start(self):
|
||||
log.msg("starting download")
|
||||
|
@ -5,7 +5,7 @@ from allmydata.chunk import HashTree, roundup_pow2
|
||||
from allmydata.Crypto.Cipher import AES
|
||||
import sha
|
||||
from allmydata.util import mathutil
|
||||
from allmydata.encode import PyRSEncoder
|
||||
from allmydata.codec import PyRSEncoder
|
||||
|
||||
def hash(data):
|
||||
return sha.new(data).digest()
|
||||
|
@ -3,7 +3,7 @@ import os, time
|
||||
from twisted.trial import unittest
|
||||
from twisted.internet import defer
|
||||
from twisted.python import log
|
||||
from allmydata.encode import PyRSEncoder, PyRSDecoder, ReplicatingEncoder, ReplicatingDecoder
|
||||
from allmydata.codec import PyRSEncoder, PyRSDecoder, ReplicatingEncoder, ReplicatingDecoder
|
||||
import random
|
||||
|
||||
class Tester:
|
@ -6,7 +6,7 @@ from twisted.application import service
|
||||
from foolscap import Referenceable
|
||||
|
||||
from allmydata.util import idlib
|
||||
from allmydata import encode
|
||||
from allmydata import codec
|
||||
|
||||
from cStringIO import StringIO
|
||||
import sha
|
||||
@ -37,7 +37,7 @@ class FileUploader:
|
||||
def make_encoder(self):
|
||||
self._needed_shares = 4
|
||||
self._shares = 4
|
||||
self._encoder = encode.Encoder(self._filehandle, self._shares)
|
||||
self._encoder = codec.Encoder(self._filehandle, self._shares)
|
||||
self._share_size = self._size
|
||||
|
||||
def set_verifierid(self, vid):
|
||||
|
Loading…
Reference in New Issue
Block a user