use the word 'codec' for erasure coding, for now. 'encode' is used for file-level segmentation/hashing

This commit is contained in:
Brian Warner 2007-01-11 20:51:27 -07:00
parent a65608fec1
commit 417c17755b
5 changed files with 7 additions and 7 deletions

View File

@ -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")

View File

@ -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()

View File

@ -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:

View File

@ -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):