instance method crc32_ITU_T

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.2.3

Signature

crc32_ITU_T()

Uses the ITU-T polynomial in the CRC32 algorithm.

Source
# File activesupport/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb, line 40
  def crc32_ITU_T
    n = length
    r = 0xFFFFFFFF

    n.times do |i|
      r ^= self[i]
      8.times do
        if (r & 1) != 0 then
          r = (r>>1) ^ 0xEDB88320
        else
          r >>= 1
        end
      end
    end

    r ^ 0xFFFFFFFF
  end

Defined in activesupport/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb line 40 · View on GitHub · Improve this page · Find usages on GitHub

Defined in String

Type at least 2 characters to search.

↑↓ navigate · open · esc close