Condensation of the ideal Bose gas in a closed volume having the shape of a rectangular parallelepiped of length L with a square base of side length l (L > l) is theoretically studied within the framework of the Bose-Einstein statistics (grand canonical ensemble) and within the statistics of a canonical ensemble of bosons. Under the condition N(l/L)(4) < 1, where N is the total number of gas particles, dependence of the average number of particles in the condensate on the temperature T in both statistics is expressed as a function of the ratio t = T/T-1, where T-1 is a certain characteristic temperature depending only on the longitudinal size L. Therefore, the condensation process exhibits a one-dimensional (1D) character. In the 1D regime, the average numbers of particles in condensates of the grand canonical and canonical ensembles coincide only in the limiting cases of t --> 0 and t --> infinity. The distribution function of the number of particles in the condensate of a canonical ensemble of bosons at t less than or equal to 1 has a resonance shape and qualitatively differs from the Bose-Einstein distribution. The former distribution begins to change in the region of t similar to 1 and acquires the shape of the Bose-Einstein distribution for t > 1. This transformation proceeds gradually that is, the 1D condensation process exhibits no features characteristic of the phase transition in a 3D system. For N(l/L)(4) > 1, the process acquires a 3D character with respect to the average number of particles in the condensate, but the 1D character of the distribution function of the number of particles in the condensate of a canonical ensemble of bosons is retained at all N values. (C) 2002 MAIK "Nauka / Interperiodica".