1. A method for inline deduplication of data, the method comprising: a computer comparing a first content of a first data block in a subset of a set of data blocks with a second content of a second data block in the subset, the set of data blocks being included in a data stream, the data stream being in transit from a source to a destination; the computer determining a basis of a relationship between the first data block and the second data block, wherein determining said basis comprises determining that a portion of the first content matches a portion of the second content, and wherein the determined basis forms a context shared by the subset of the set of data blocks; the computer selecting a code data structure from a set of code data structures using the context, wherein the context is associated with the code data structure, and wherein the code data structure includes a set of codes; the computer loading into a memory the code data structure from the set of code data structures; the computer determining that a second code data structure from the set of code data structures unrelated to the context is not to be loaded into the memory; the computer computing, for the first data block in the subset of data blocks, a code corresponding to a content of the first data block; the computer determining whether the code corresponding to the content of the first data block matches a stored code in the code data structure; the computer replacing, responsive to the code corresponding to the content of the first data block matching the stored code, the first data block with a reference to an instance of the first data block; and the computer causing the reference to be stored in a target data processing system.